Class: EasyCallbacks::Models::Callback

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_callbacks/models/callback.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_blockObject

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_nameObject

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_typeObject

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_nameObject

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