Class: Messenger::Elements::QuickReply
- Inherits:
-
Object
- Object
- Messenger::Elements::QuickReply
- Includes:
- Components::Element
- Defined in:
- lib/messenger/components/elements/quick_reply.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(content_type:, title: nil, payload: nil, image_url: nil) ⇒ QuickReply
constructor
A new instance of QuickReply.
Methods included from Components::Element
Constructor Details
#initialize(content_type:, title: nil, payload: nil, image_url: nil) ⇒ QuickReply
Returns a new instance of QuickReply.
10 11 12 13 14 15 |
# File 'lib/messenger/components/elements/quick_reply.rb', line 10 def initialize(content_type:, title: nil, payload: nil, image_url: nil) @content_type = content_type @title = title if text?(content_type) @payload = payload if text?(content_type) @image_url = image_url end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
8 9 10 |
# File 'lib/messenger/components/elements/quick_reply.rb', line 8 def content_type @content_type end |
#image_url ⇒ Object
Returns the value of attribute image_url.
8 9 10 |
# File 'lib/messenger/components/elements/quick_reply.rb', line 8 def image_url @image_url end |
#payload ⇒ Object
Returns the value of attribute payload.
8 9 10 |
# File 'lib/messenger/components/elements/quick_reply.rb', line 8 def payload @payload end |
#title ⇒ Object
Returns the value of attribute title.
8 9 10 |
# File 'lib/messenger/components/elements/quick_reply.rb', line 8 def title @title end |