Class: Zm::Client::ContactsCollection

Inherits:
Base::ObjectsCollection show all
Defined in:
lib/zm/client/contact/contacts_collection.rb

Overview

collection account contacts

Constant Summary

Constants inherited from Base::ObjectsCollection

Base::ObjectsCollection::METHODS_MISSING_LIST

Instance Attribute Summary

Attributes inherited from Base::ObjectsCollection

#parent

Instance Method Summary collapse

Methods inherited from Base::ObjectsCollection

#all, #all!, #attrs, #build_from_entry, #count, #find, #first, #method_missing, #order, #page, #per_page, #respond_to_missing?, #where

Constructor Details

#initialize(parent) ⇒ ContactsCollection

Returns a new instance of ContactsCollection.



7
8
9
# File 'lib/zm/client/contact/contacts_collection.rb', line 7

def initialize(parent)
  @parent = parent
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Zm::Client::Base::ObjectsCollection

Instance Method Details

#new {|contact| ... } ⇒ Object

Yields:

  • (contact)


11
12
13
14
15
# File 'lib/zm/client/contact/contacts_collection.rb', line 11

def new
  contact = Contact.new(@parent)
  yield(contact) if block_given?
  contact
end