module Rooftop::HookCalls
Public Class Methods
included(base)
click to toggle source
# 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