lib/adhearsion/call_controller.rb in adhearsion-2.2.1 vs lib/adhearsion/call_controller.rb in adhearsion-2.3.0
- old
+ new
@@ -99,11 +99,11 @@
completion_callback.call call if completion_callback
end
# @private
def execute!(*options)
- call.register_controller! self
+ call.async.register_controller self
execute_callbacks :before_call
run
rescue Call::Hangup
logger.info "Call was hung up"
rescue SyntaxError, StandardError => e
@@ -123,9 +123,10 @@
#
# Invoke another controller class within this controller, returning to this context on completion.
#
# @param [Class] controller_class The class of controller to execute
# @param [Hash] metadata generic key-value storage applicable to the controller
+ # @return The return value of the controller's run method
#
def invoke(controller_class, metadata = nil)
controller = controller_class.new call, metadata
controller.run
end