Class: Messenger::Templates::QuickReplies

Inherits:
Object
  • Object
show all
Includes:
Components::Element
Defined in:
lib/messenger/components/templates/quick_replies.rb

Constant Summary collapse

ATTRIBUTES =
%w(text quick_replies).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Components::Element

#build, #build_elements

Constructor Details

#initialize(text:, quick_replies:) ⇒ QuickReplies

Returns a new instance of QuickReplies.



12
13
14
15
# File 'lib/messenger/components/templates/quick_replies.rb', line 12

def initialize(text:, quick_replies:)
  @text          = text
  @quick_replies = build_elements(quick_replies)
end

Instance Attribute Details

#quick_repliesObject

Returns the value of attribute quick_replies.



8
9
10
# File 'lib/messenger/components/templates/quick_replies.rb', line 8

def quick_replies
  @quick_replies
end

#textObject

Returns the value of attribute text.



8
9
10
# File 'lib/messenger/components/templates/quick_replies.rb', line 8

def text
  @text
end