Class: Zm::Client::Message::Attachments

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/message/message.rb

Overview

collection attachments

Instance Method Summary collapse

Constructor Details

#initializeAttachments

Returns a new instance of Attachments.



135
136
137
# File 'lib/zm/client/message/message.rb', line 135

def initialize
  @attachments = []
end

Instance Method Details

#add(attachment) ⇒ Object



139
140
141
142
143
# File 'lib/zm/client/message/message.rb', line 139

def add(attachment)
  return unless attachment.is_a?(Attachment)

  @attachments.push(attachment)
end

#to_jsnsObject



145
146
147
# File 'lib/zm/client/message/message.rb', line 145

def to_jsns
  @attachments.map(&:to_jsns)
end