Method: DataMapper::Hook::ClassMethods#before_class_method
- Defined in:
- lib/dm-core/support/hook.rb
#before_class_method(target_method, method_sym = nil, &block) ⇒ Object
Note:
Either method_sym or block is required.
Inject code that executes before the target class method.
-
56 57 58 |
# File 'lib/dm-core/support/hook.rb', line 56 def before_class_method(target_method, method_sym = nil, &block) install_hook :before, target_method, method_sym, :class, &block end |