Class: Plivo::Buttons
- Inherits:
-
Object
- Object
- Plivo::Buttons
- Defined in:
- lib/plivo/interactive.rb
Instance Attribute Summary collapse
-
#cta_url ⇒ Object
Returns the value of attribute cta_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(id: nil, title: nil, cta_url: nil) ⇒ Buttons
constructor
A new instance of Buttons.
- #to_hash ⇒ Object
Constructor Details
#initialize(id: nil, title: nil, cta_url: nil) ⇒ Buttons
Returns a new instance of Buttons.
91 92 93 94 95 |
# File 'lib/plivo/interactive.rb', line 91 def initialize(id: nil, title: nil, cta_url: nil) @id = id @title = title @cta_url = cta_url end |
Instance Attribute Details
#cta_url ⇒ Object
Returns the value of attribute cta_url.
89 90 91 |
# File 'lib/plivo/interactive.rb', line 89 def cta_url @cta_url end |
#id ⇒ Object
Returns the value of attribute id.
89 90 91 |
# File 'lib/plivo/interactive.rb', line 89 def id @id end |
#title ⇒ Object
Returns the value of attribute title.
89 90 91 |
# File 'lib/plivo/interactive.rb', line 89 def title @title end |
Instance Method Details
#to_hash ⇒ Object
97 98 99 100 101 102 103 |
# File 'lib/plivo/interactive.rb', line 97 def to_hash { id: @id, title: @title, cta_url: @cta_url }.reject { |_, v| v.nil? } end |