class Twilio::TwiML::Gather

<Gather> TwiML Verb

Public Class Methods

new(**keyword_args) { |self| ... } click to toggle source
Calls superclass method Twilio::TwiML::TwiML::new
    # File lib/twilio-ruby/twiml/voice_response.rb
849 def initialize(**keyword_args)
850   super(**keyword_args)
851   @name = 'Gather'
852 
853   yield(self) if block_given?
854 end

Public Instance Methods

pause(length: nil, **keyword_args) click to toggle source

Create a new <Pause> element

length

Length in seconds to pause

keyword_args

additional attributes

    # File lib/twilio-ruby/twiml/voice_response.rb
874 def pause(length: nil, **keyword_args)
875   append(Pause.new(length: length, **keyword_args))
876 end
play(url: nil, loop: nil, digits: nil, **keyword_args) click to toggle source

Create a new <Play> element

url

Media URL

loop

Times to loop media

digits

Play DTMF tones for digits

keyword_args

additional attributes

    # File lib/twilio-ruby/twiml/voice_response.rb
884 def play(url: nil, loop: nil, digits: nil, **keyword_args)
885   append(Play.new(url: url, loop: loop, digits: digits, **keyword_args))
886 end
say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args) { |say| ... } click to toggle source

Create a new <Say> element

message

Message to say

voice

Voice to use

loop

Times to loop message

language

Message langauge

keyword_args

additional attributes

    # File lib/twilio-ruby/twiml/voice_response.rb
863 def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
864   say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
865 
866   yield(say) if block_given?
867   append(say)
868 end