Class: EasyCallbacks::Models::Callback
- Inherits:
-
Object
- Object
- EasyCallbacks::Models::Callback
- Defined in:
- lib/easy_callbacks/models/callback.rb
Instance Attribute Summary collapse
-
#callback_block ⇒ Object
Returns the value of attribute callback_block.
-
#callback_method_name ⇒ Object
Returns the value of attribute callback_method_name.
-
#callback_type ⇒ Object
Returns the value of attribute callback_type.
-
#target_method_name ⇒ Object
Returns the value of attribute target_method_name.
Instance Method Summary collapse
-
#initialize(callback_type, target_method_name, callback_method_name) ⇒ Callback
constructor
A new instance of Callback.
Constructor Details
#initialize(callback_type, target_method_name, callback_method_name) ⇒ Callback
Returns a new instance of Callback.
8 9 10 11 12 13 |
# File 'lib/easy_callbacks/models/callback.rb', line 8 def initialize(callback_type, target_method_name, callback_method_name) self.callback_type = callback_type self.target_method_name = target_method_name self.callback_method_name = callback_method_name self.callback_block = block_given? ? Proc.new : nil end |
Instance Attribute Details
#callback_block ⇒ Object
Returns the value of attribute callback_block.
6 7 8 |
# File 'lib/easy_callbacks/models/callback.rb', line 6 def callback_block @callback_block end |
#callback_method_name ⇒ Object
Returns the value of attribute callback_method_name.
6 7 8 |
# File 'lib/easy_callbacks/models/callback.rb', line 6 def callback_method_name @callback_method_name end |
#callback_type ⇒ Object
Returns the value of attribute callback_type.
6 7 8 |
# File 'lib/easy_callbacks/models/callback.rb', line 6 def callback_type @callback_type end |
#target_method_name ⇒ Object
Returns the value of attribute target_method_name.
6 7 8 |
# File 'lib/easy_callbacks/models/callback.rb', line 6 def target_method_name @target_method_name end |