Class: Zm::Client::Message::Attachments
- Inherits:
-
Object
- Object
- Zm::Client::Message::Attachments
- Defined in:
- lib/zm/client/message/message.rb
Overview
collection attachments
Instance Method Summary collapse
- #add(attachment) ⇒ Object
-
#initialize ⇒ Attachments
constructor
A new instance of Attachments.
- #to_jsns ⇒ Object
Constructor Details
#initialize ⇒ Attachments
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() return unless .is_a?(Attachment) @attachments.push() end |
#to_jsns ⇒ Object
145 146 147 |
# File 'lib/zm/client/message/message.rb', line 145 def to_jsns @attachments.map(&:to_jsns) end |