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