Class: Messenger::Templates::Generic
- Inherits:
-
Object
- Object
- Messenger::Templates::Generic
- Includes:
- Components::Attachment
- Defined in:
- lib/messenger/components/templates/generic.rb
Constant Summary collapse
- ATTRIBUTES =
%w(template_type elements).freeze
Instance Attribute Summary collapse
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#template_type ⇒ Object
Returns the value of attribute template_type.
Attributes included from Components::Attachment
Instance Method Summary collapse
-
#initialize(elements:) ⇒ Generic
constructor
A new instance of Generic.
Methods included from Components::Attachment
#all_attributes, #allowed_attribute?, #build, #build_elements, #payload
Constructor Details
#initialize(elements:) ⇒ Generic
Returns a new instance of Generic.
12 13 14 15 16 |
# File 'lib/messenger/components/templates/generic.rb', line 12 def initialize(elements:) @type = 'template' @template_type = 'generic' @elements = build_elements(elements) end |
Instance Attribute Details
#elements ⇒ Object
Returns the value of attribute elements.
8 9 10 |
# File 'lib/messenger/components/templates/generic.rb', line 8 def elements @elements end |
#template_type ⇒ Object
Returns the value of attribute template_type.
8 9 10 |
# File 'lib/messenger/components/templates/generic.rb', line 8 def template_type @template_type end |