Class: MsTeamsHermes::Components::ColumnSet
- Defined in:
- lib/msteams_hermes/components/column_set.rb
Overview
A class representing Microsoft’s ColumnSet object adaptivecards.io/explorer/ColumnSet.html
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
Instance Method Summary collapse
-
#initialize(columns:) ⇒ ColumnSet
constructor
A new instance of ColumnSet.
- #to_hash ⇒ Object
Constructor Details
#initialize(columns:) ⇒ ColumnSet
Returns a new instance of ColumnSet.
18 19 20 21 |
# File 'lib/msteams_hermes/components/column_set.rb', line 18 def initialize(columns:) @columns = columns raise "ColumnSet `columns` must be an Array" unless @columns.is_a? Array end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
16 17 18 |
# File 'lib/msteams_hermes/components/column_set.rb', line 16 def columns @columns end |
Instance Method Details
#to_hash ⇒ Object
23 24 25 26 27 28 |
# File 'lib/msteams_hermes/components/column_set.rb', line 23 def to_hash { type: "ColumnSet", columns: columns.map(&:to_hash) } end |