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::Valuefor evaluating callbacks, now that we have that gem.
0.3.5¶ ↑
-
Fixing bug where
uninitialized constant Hookswas thrown when using InheritableAttribute exclusively. Thanks to @haswalt for reporting.
0.3.4¶ ↑
-
Removing
InheritableAttributeas we use uber'sInheritableAttrnow.
0.3.3¶ ↑
-
Fix a bug where the hook writer method (e.g.
#after_dark) wasn't available on the instance even whenInstanceHookswas included.
0.3.2¶ ↑
-
Added
Hooks::InstanceHooksto 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: trueand returningnilorfalsefrom the callback. -
Internal refactorings: hooks are now encapsulated in
Hookinstances and run their callback chains.
0.2.2¶ ↑
-
#run_hooknow 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_attrdoesn't crash since it is not cloned anymore. Note that an uncloneable attribute value still causes an exception.