Class: Plivo::Buttons

Inherits:
Object
  • Object
show all
Defined in:
lib/plivo/interactive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_urlObject

Returns the value of attribute cta_url.



89
90
91
# File 'lib/plivo/interactive.rb', line 89

def cta_url
  @cta_url
end

#idObject

Returns the value of attribute id.



89
90
91
# File 'lib/plivo/interactive.rb', line 89

def id
  @id
end

#titleObject

Returns the value of attribute title.



89
90
91
# File 'lib/plivo/interactive.rb', line 89

def title
  @title
end

Instance Method Details

#to_hashObject



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