Class: Plivo::Body

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text: nil) ⇒ Body



47
48
49
# File 'lib/plivo/interactive.rb', line 47

def initialize(text: nil)
  @text = text
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



45
46
47
# File 'lib/plivo/interactive.rb', line 45

def text
  @text
end

Instance Method Details

#to_hashObject



51
52
53
54
55
# File 'lib/plivo/interactive.rb', line 51

def to_hash
  {
    text: @text
  }.reject { |_, v| v.nil? }
end