Class: Zm::Client::Message::AttachmentsCollection

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

Overview

collection attachments

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MissingMethodStaticCollection

#method_missing

Constructor Details

#initializeAttachmentsCollection

Returns a new instance of AttachmentsCollection.



12
13
14
# File 'lib/zm/client/message/attachments_collection.rb', line 12

def initialize
  @all = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MissingMethodStaticCollection

Instance Attribute Details

#allObject (readonly)

Returns the value of attribute all.



10
11
12
# File 'lib/zm/client/message/attachments_collection.rb', line 10

def all
  @all
end

Instance Method Details

#add(attachment) ⇒ Object



16
17
18
19
20
# File 'lib/zm/client/message/attachments_collection.rb', line 16

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

  @all.push(attachment)
end