Class: Quince::Callback

Inherits:
Object
  • Object
show all
Includes:
Interface
Defined in:
lib/quince/callback.rb

Defined Under Namespace

Modules: ComponentHelpers, Interface

Instance Attribute Summary

Attributes included from Interface

#method_name, #receiver

Instance Method Summary collapse

Constructor Details

#initialize(receiver, method_name, **opts) ⇒ Callback

Returns a new instance of Callback.



39
40
41
42
43
44
45
46
47
48
# File 'lib/quince/callback.rb', line 39

def initialize(
  receiver,
  method_name,
  **opts
)
  @receiver, @method_name = receiver, method_name
  ComponentHelpers::DEFAULT_CALLBACK_OPTIONS.each_key do |opt|
    instance_variable_set :"@#{opt}", opts.fetch(opt)
  end
end