Class: Messenger::Parameters::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/messenger/parameters/attachment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, payload:) ⇒ Attachment

Returns a new instance of Attachment.



6
7
8
9
# File 'lib/messenger/parameters/attachment.rb', line 6

def initialize(type:, payload:)
  @type = type
  @url  = payload['url']
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/messenger/parameters/attachment.rb', line 4

def type
  @type
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/messenger/parameters/attachment.rb', line 4

def url
  @url
end