Skip to content

Latest commit

 

History

History
53 lines (28 loc) · 1.6 KB

CHANGES.md

File metadata and controls

53 lines (28 loc) · 1.6 KB

0.4.1

  • Introduce define_hook .., scope: ->{} option. This allows changing the callback execution context per callback. Many thanks to @doudou for pushing this.

0.4.0

  • Same as 0.3.6 but we wanna indicate an internal change (using uber).

0.3.6

  • Use Uber::Options::Value for evaluating callbacks, now that we have that gem.

0.3.5

  • Fixing bug where uninitialized constant Hooks was thrown when using InheritableAttribute exclusively. Thanks to @haswalt for reporting.

0.3.4

  • Removing InheritableAttribute as we use uber's InheritableAttr now.

0.3.3

  • Fix a bug where the hook writer method (e.g. #after_dark) wasn't available on the instance even when InstanceHooks was included.

0.3.2

  • Added Hooks::InstanceHooks to add hooks and/or callbacks on instance level. Thanks to @mpapis for that suggestion.

0.3.1

  • Fix a bug, string hook names are now treated as symbols.

0.3.0

  • The callback chain can now be halted by configuring the hook as halts_on_falsey: true and returning nil or false from the callback.
  • Internal refactorings: hooks are now encapsulated in Hook instances and run their callback chains.

0.2.2

  • #run_hook now returns the list of callback results.

0.2.1

  • You can now pass multiple hook names to #define_hooks.

0.2.0

h3. Changes

  • Callback blocks are now executed on the instance using instance_exec. If you need to access the class (former context) use self.class.

0.1.4

  • An uninitialized inheritable_attr doesn't crash since it is not cloned anymore. Note that an uncloneable attribute value still causes an exception.