class Plivo::Action
Attributes
sections[RW]
Public Class Methods
new(buttons: nil, sections: nil)
click to toggle source
# File lib/plivo/interactive.rb, line 75 def initialize(buttons: nil, sections: nil) @buttons = buttons ? buttons.map { |b| Buttons.new(**b) } : [] @sections = sections ? sections.map { |s| Section.new(**s) } : [] end
Public Instance Methods
to_hash()
click to toggle source
# File lib/plivo/interactive.rb, line 80 def to_hash { buttons: @buttons.map(&:to_hash), sections: @sections.map(&:to_hash), }.reject { |_, v| v.nil? } end