Module: Rooftop::HookCalls
- Defined in:
- lib/rooftop/hook_calls.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/rooftop/hook_calls.rb', line 7 def self.included(base) base.extend ClassMethods # Iterate over an instance var which is a hash of types of hook, and blocks to call # like this {after_find: [->{something}, ->{something}]} base.instance_variable_set(:"@hook_calls", base.instance_variable_get(:"@hook_calls") || {}) end |