Class: Wee::Component::OnAnswer

Inherits:
Struct show all
Defined in:
lib/wee/core/component.rb

Instance Method Summary collapse

Methods inherited from Struct

#restore_snapshot, #take_snapshot

Instance Method Details

#call(*answer_args) ⇒ Object



334
335
336
337
338
339
340
341
342
343
# File 'lib/wee/core/component.rb', line 334

def call(*answer_args)
  calling_component.remove_decoration(delegate)
  called_component.remove_decoration(answer)
  return if return_callback.nil?
  if return_callback.respond_to?(:call)
    return_callback.call(*(args + answer_args))
  else
    calling_component.send(return_callback, *(args + answer_args))
  end
end