Class: Zm::Client::Message::Attachments
- Inherits:
-
Object
- Object
- Zm::Client::Message::Attachments
- Defined in:
- lib/zm/client/message/message.rb
Overview
collection attachments
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
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.
192 193 194 |
# File 'lib/zm/client/message/message.rb', line 192 def initialize @all = [] end |
Instance Attribute Details
#all ⇒ Object (readonly)
Returns the value of attribute all.
191 192 193 |
# File 'lib/zm/client/message/message.rb', line 191 def all @all end |
Instance Method Details
#add(attachment) ⇒ Object
196 197 198 199 200 |
# File 'lib/zm/client/message/message.rb', line 196 def add() return unless .is_a?(Attachment) @all.push() end |
#to_jsns ⇒ Object
202 203 204 |
# File 'lib/zm/client/message/message.rb', line 202 def to_jsns @all.map(&:to_jsns) end |