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