Class: Messenger::Elements::Image

Inherits:
Object
  • Object
show all
Includes:
Components::Attachment
Defined in:
lib/messenger/components/elements/image.rb

Constant Summary collapse

ATTRIBUTES =
%w(url).freeze

Instance Attribute Summary collapse

Attributes included from Components::Attachment

#type

Instance Method Summary collapse

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

#urlObject

Returns the value of attribute url.



8
9
10
# File 'lib/messenger/components/elements/image.rb', line 8

def url
  @url
end