Class: Twilio::TwiML::Application
- Defined in:
- lib/twilio-ruby/twiml/voice_response.rb
Overview
<Application> TwiML Noun
Instance Attribute Summary
Attributes inherited from TwiML
Instance Method Summary collapse
-
#application_sid(sid, **keyword_args) ⇒ Object
- Create a new <ApplicationSid> element sid
- Application sid to dial keyword_args
-
additional attributes.
-
#initialize(application_sid: nil, **keyword_args) {|_self| ... } ⇒ Application
constructor
A new instance of Application.
-
#parameter(name: nil, value: nil, **keyword_args) ⇒ Object
- Create a new <Parameter> element name
- The name of the custom parameter value
- The value of the custom parameter keyword_args
-
additional attributes.
Methods inherited from TwiML
#add_child, #add_text, #append, #comment, to_lower_camel_case, #to_s, #xml
Constructor Details
#initialize(application_sid: nil, **keyword_args) {|_self| ... } ⇒ Application
Returns a new instance of Application.
1769 1770 1771 1772 1773 1774 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1769 def initialize(application_sid: nil, **keyword_args) super(**keyword_args) @name = 'Application' @value = application_sid unless application_sid.nil? yield(self) if block_given? end |
Instance Method Details
#application_sid(sid, **keyword_args) ⇒ Object
Create a new <ApplicationSid> element
- sid
-
Application sid to dial
- keyword_args
-
additional attributes
1780 1781 1782 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1780 def application_sid(sid, **keyword_args) append(ApplicationSid.new(sid, **keyword_args)) end |
#parameter(name: nil, value: nil, **keyword_args) ⇒ Object
Create a new <Parameter> element
- name
-
The name of the custom parameter
- value
-
The value of the custom parameter
- keyword_args
-
additional attributes
1789 1790 1791 |
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1789 def parameter(name: nil, value: nil, **keyword_args) append(Parameter.new(name: name, value: value, **keyword_args)) end |