lib/tropo-webapi-ruby/tropo-webapi-ruby.rb
##
# The wait function suspends the script's current thread of execution for the specified length of time, or until the active session changes state (such as a user hanging up), whichever occurs first. 
#
# @overload wait(params)
#   @param [Hash] params the options to create a message with.
#   @option params [optional, String or Array] :allowSignals This parameter allows you to assign a signal to this function.
#   @option params [required, Integer] :milliseconds This defines the time to wait for a state change. Defaults to 0ms if the parameter is skipped.
# @overload wait(params, &block)
#   @param [Hash] params the options to create a message with.
#   @param [Block] takes a block so that you may trigger actions, such as a say, on a specific event
#   @option params [optional, String or Array] :allowSignals This parameter allows you to assign a signal to this function.
#   @option params [required, Integer] :milliseconds This defines the time to wait for a state change. Defaults to 0ms if the parameter is skipped.
# @return [String, nil] the JSON string to be passed back to Tropo or nil
#   if the method has been called from inside a block
The wait function suspends the script's current thread of execution for the specified length of time, or until the active session changes state (such as a user hanging up), whichever occurs first.
The wait function suspends the script ' s current thread of execution for the specified length of time or until the active session changes state ( such as a user hanging up ) whichever occurs first .
def wait(params={}, &block)
      if block_given?
        create_nested_hash('wait', params)
        instance_exec(&block)
        @response[:tropo] << @nested_hash
      else
        hash = build_action('wait', params)
        @response[:tropo] << hash
      end
      render_response if @building.nil?
    end
def wait ( params = { } , & block ) if block_given? create_nested_hash ( 'wait' , params ) instance_exec ( & block ) @response [ :tropo ] << @nested_hash else hash = build_action ( 'wait' , params ) @response [ :tropo ] << hash end render_response if @building . nil? end
The wait function suspends the script's current thread of execution for the specified length of time, or until the active session changes state (such as a user hanging up), whichever occurs first.
The wait function suspends the script ' s current thread of execution for the specified length of time or until the active session changes state ( such as a user hanging up ) whichever occurs first .
the JSON string to be passed back to Tropo or nil if the method has been called from inside a block
the JSON string to be passed back to Tropo or nil if the method has been called from inside a block
String, nil
params
block
overload
wait(params) @param [Hash] params the options to create a message with. @option params [optional, String or Array] :allowSignals This parameter allows you to assign a signal to this function. @option params [required, Integer] :milliseconds This defines the time to wait for a state change. Defaults to 0ms if the parameter is skipped.
wait ( params ) @param [ Hash ] params the options to create a message with . @option params [ optional String or Array ] : allowSignals This parameter allows you to assign a signal to this function . @option params [ required Integer ] : milliseconds This defines the time to wait for a state change . Defaults to 0ms if the parameter is skipped .
overload
wait(params, █) @param [Hash] params the options to create a message with. @param [Block] takes a block so that you may trigger actions, such as a say, on a specific event @option params [optional, String or Array] :allowSignals This parameter allows you to assign a signal to this function. @option params [required, Integer] :milliseconds This defines the time to wait for a state change. Defaults to 0ms if the parameter is skipped.
wait ( params █ ) @param [ Hash ] params the options to create a message with . @param [ Block ] takes a block so that you may trigger actions such as a say on a specific event @option params [ optional String or Array ] : allowSignals This parameter allows you to assign a signal to this function . @option params [ required Integer ] : milliseconds This defines the time to wait for a state change . Defaults to 0ms if the parameter is skipped .