Class: Plivo::Interactive
- Inherits:
-
Object
- Object
- Plivo::Interactive
- Defined in:
- lib/plivo/interactive.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#body ⇒ Object
Returns the value of attribute body.
-
#footer ⇒ Object
Returns the value of attribute footer.
-
#header ⇒ Object
Returns the value of attribute header.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type: nil, header: nil, body: nil, footer: nil, action: nil) ⇒ Interactive
constructor
A new instance of Interactive.
- #to_hash ⇒ Object
Constructor Details
#initialize(type: nil, header: nil, body: nil, footer: nil, action: nil) ⇒ Interactive
Returns a new instance of Interactive.
7 8 9 10 11 12 13 |
# File 'lib/plivo/interactive.rb', line 7 def initialize(type: nil, header: nil, body: nil, footer: nil, action: nil) @type = type @header = header @body = body @footer = @action = action end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
5 6 7 |
# File 'lib/plivo/interactive.rb', line 5 def action @action end |
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/plivo/interactive.rb', line 5 def body @body end |
#footer ⇒ Object
Returns the value of attribute footer.
5 6 7 |
# File 'lib/plivo/interactive.rb', line 5 def @footer end |
#header ⇒ Object
Returns the value of attribute header.
5 6 7 |
# File 'lib/plivo/interactive.rb', line 5 def header @header end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/plivo/interactive.rb', line 5 def type @type end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/plivo/interactive.rb', line 15 def to_hash { type: @type, header: @header&.to_hash, body: @body&.to_hash, footer: @footer&.to_hash, action: @action&.to_hash }.reject { |_, v| v.nil? } end |