class Plivo::Section
Attributes
rows[RW]
title[RW]
Public Class Methods
new(title: nil, rows: nil)
click to toggle source
# File lib/plivo/interactive.rb, line 109 def initialize(title: nil, rows: nil) @title = title @rows = rows ? rows.map { |r| Row.new(**r) } : [] end
Public Instance Methods
to_hash()
click to toggle source
# File lib/plivo/interactive.rb, line 114 def to_hash { title: @title, rows: @rows.map(&:to_hash), }.reject { |_, v| v.nil? } end