Module: Ruckus::StructureBeforeCallbacks
- Included in:
- Structure
- Defined in:
- lib/ruckus/structure/beforebacks.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/ruckus/structure/beforebacks.rb', line 3 def self.included(klass) klass.extend(ClassMethods) klass.class_eval { class_inheritable_array :before_callbacks write_inheritable_array :before_callbacks, [] } end |
Instance Method Details
#before_render_hook ⇒ Object
12 13 14 |
# File 'lib/ruckus/structure/beforebacks.rb', line 12 def before_render_hook self.class.before_callbacks.each {|cb| self.instance_eval(&cb)} end |