Class: BootyCall::Callbacker
- Inherits:
-
Object
- Object
- BootyCall::Callbacker
- Defined in:
- lib/booty_call/callbacker.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #after(method_id, *symbols, &block) ⇒ Object
- #before(method_id, *symbols, &block) ⇒ Object
-
#initialize(klass) ⇒ Callbacker
constructor
A new instance of Callbacker.
Constructor Details
#initialize(klass) ⇒ Callbacker
Returns a new instance of Callbacker.
5 6 7 8 |
# File 'lib/booty_call/callbacker.rb', line 5 def initialize(klass) @klass = klass extend_klass end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'lib/booty_call/callbacker.rb', line 3 def klass @klass end |
Instance Method Details
#after(method_id, *symbols, &block) ⇒ Object
14 15 16 |
# File 'lib/booty_call/callbacker.rb', line 14 def after(method_id, *symbols, &block) add_callback(:after, method_id, *symbols, &block) end |
#before(method_id, *symbols, &block) ⇒ Object
10 11 12 |
# File 'lib/booty_call/callbacker.rb', line 10 def before(method_id, *symbols, &block) add_callback(:before, method_id, *symbols, &block) end |