Module: ContentDriven::Hooks
- Included in:
- Page
- Defined in:
- lib/content_driven/hooks.rb
Instance Attribute Summary collapse
-
#after_hooks ⇒ Object
readonly
Returns the value of attribute after_hooks.
Instance Method Summary collapse
Instance Attribute Details
#after_hooks ⇒ Object (readonly)
Returns the value of attribute after_hooks.
5 6 7 |
# File 'lib/content_driven/hooks.rb', line 5 def after_hooks @after_hooks end |
Instance Method Details
#after(&block) ⇒ Object
16 17 18 |
# File 'lib/content_driven/hooks.rb', line 16 def after &block after_hooks << block end |
#call_after_hooks ⇒ Object
10 11 12 13 14 |
# File 'lib/content_driven/hooks.rb', line 10 def call_after_hooks after_hooks.each do |hook| self.instance_eval &hook end end |