Class: MessageQuickly::Messaging::Attachment

Inherits:
Base
  • Object
show all
Defined in:
lib/message_quickly/messaging/attachment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from MessageQuickly::Messaging::Base

Instance Attribute Details

#payloadObject (readonly)

Returns the value of attribute payload.



5
6
7
# File 'lib/message_quickly/messaging/attachment.rb', line 5

def payload
  @payload
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/message_quickly/messaging/attachment.rb', line 5

def type
  @type
end

Instance Method Details

#file?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/message_quickly/messaging/attachment.rb', line 7

def file?
  false
end

#to_hashObject



11
12
13
# File 'lib/message_quickly/messaging/attachment.rb', line 11

def to_hash
  { type: type, payload: payload }
end