Class: Plivo::Header
- Inherits:
-
Object
- Object
- Plivo::Header
- Defined in:
- lib/plivo/interactive.rb
Instance Attribute Summary collapse
-
#media ⇒ Object
Returns the value of attribute media.
-
#text ⇒ Object
Returns the value of attribute text.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type: nil, text: nil, media: nil) ⇒ Header
constructor
A new instance of Header.
- #to_hash ⇒ Object
Constructor Details
#initialize(type: nil, text: nil, media: nil) ⇒ Header
Returns a new instance of Header.
29 30 31 32 33 |
# File 'lib/plivo/interactive.rb', line 29 def initialize(type: nil, text: nil, media: nil) @type = type @text = text @media = media end |
Instance Attribute Details
#media ⇒ Object
Returns the value of attribute media.
27 28 29 |
# File 'lib/plivo/interactive.rb', line 27 def media @media end |
#text ⇒ Object
Returns the value of attribute text.
27 28 29 |
# File 'lib/plivo/interactive.rb', line 27 def text @text end |
#type ⇒ Object
Returns the value of attribute type.
27 28 29 |
# File 'lib/plivo/interactive.rb', line 27 def type @type end |
Instance Method Details
#to_hash ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/plivo/interactive.rb', line 35 def to_hash { type: @type, text: @text, media: @media }.reject { |_, v| v.nil? } end |