Class: Plivo::Body
- Inherits:
-
Object
- Object
- Plivo::Body
- Defined in:
- lib/plivo/interactive.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text: nil) ⇒ Body
constructor
A new instance of Body.
- #to_hash ⇒ Object
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
#text ⇒ Object
Returns the value of attribute text.
45 46 47 |
# File 'lib/plivo/interactive.rb', line 45 def text @text end |
Instance Method Details
#to_hash ⇒ Object
51 52 53 54 55 |
# File 'lib/plivo/interactive.rb', line 51 def to_hash { text: @text }.reject { |_, v| v.nil? } end |