Module: Interaptor::ClassMethods
- Defined in:
- lib/interaptor/callbacks.rb
Instance Method Summary collapse
- #after(&block) ⇒ Object
- #after_callbacks ⇒ Object
- #before(&block) ⇒ Object
- #before_callbacks ⇒ Object
Instance Method Details
#after(&block) ⇒ Object
32 33 34 |
# File 'lib/interaptor/callbacks.rb', line 32 def after(&block) after_callbacks << block end |
#after_callbacks ⇒ Object
40 41 42 |
# File 'lib/interaptor/callbacks.rb', line 40 def after_callbacks @after_callbacks ||= [] end |
#before(&block) ⇒ Object
28 29 30 |
# File 'lib/interaptor/callbacks.rb', line 28 def before(&block) before_callbacks << block end |
#before_callbacks ⇒ Object
36 37 38 |
# File 'lib/interaptor/callbacks.rb', line 36 def before_callbacks @before_callbacks ||= [] end |