Class: Messenger::Templates::Buttons
- Inherits:
-
Components::Attachment
- Object
- Components::Attachment
- Messenger::Templates::Buttons
- Defined in:
- lib/messenger/components/templates/buttons.rb
Constant Summary collapse
- ATTRIBUTES =
%w(template_type text buttons).freeze
Instance Method Summary collapse
-
#initialize(text:, buttons:) ⇒ Buttons
constructor
A new instance of Buttons.
Methods inherited from Components::Attachment
#all_attributes, #allowed_attribute?, #build, #build_elements, #payload
Constructor Details
#initialize(text:, buttons:) ⇒ Buttons
Returns a new instance of Buttons.
8 9 10 11 12 13 |
# File 'lib/messenger/components/templates/buttons.rb', line 8 def initialize(text:, buttons:) @type = 'template' @template_type = 'button' @text = text @buttons = build_elements() end |