Class: Zm::Client::DocumentsCollection
- Inherits:
-
Base::AccountSearchObjectsCollection
- Object
- Base::ObjectsCollection
- Base::AccountObjectsCollection
- Base::AccountSearchObjectsCollection
- Zm::Client::DocumentsCollection
- Defined in:
- lib/zm/client/document/documents_collection.rb
Overview
collection of documents
Constant Summary collapse
- DEFAULT_QUERY =
'in:briefcase'
Constants inherited from Base::ObjectsCollection
Base::ObjectsCollection::METHODS_MISSING_LIST
Instance Attribute Summary
Attributes inherited from Base::AccountSearchObjectsCollection
Attributes inherited from Base::ObjectsCollection
Instance Method Summary collapse
- #find_each(offset: 0, limit: 500, &block) ⇒ Object
-
#initialize(parent) ⇒ DocumentsCollection
constructor
A new instance of DocumentsCollection.
Methods inherited from Base::AccountSearchObjectsCollection
#end_at, #find, #folder_ids, #folders, #ids, #order, #reset, #start_at, #where
Methods inherited from Base::ObjectsCollection
#all, #all!, #find, #first, #logger, #method_missing, #new, #order, #page, #per_page, #respond_to_missing?
Methods included from Inspector
#inspect, #instance_variables_map, #to_h, #to_s
Constructor Details
#initialize(parent) ⇒ DocumentsCollection
Returns a new instance of DocumentsCollection.
9 10 11 12 13 14 15 |
# File 'lib/zm/client/document/documents_collection.rb', line 9 def initialize(parent) super(parent) @child_class = Document @builder_class = DocumentsBuilder @type = SoapConstants::DOCUMENT @sort_by = SoapConstants::DATE_ASC end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Zm::Client::Base::ObjectsCollection
Instance Method Details
#find_each(offset: 0, limit: 500, &block) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/zm/client/document/documents_collection.rb', line 17 def find_each(offset: 0, limit: 500, &block) @more = true @offset = offset @limit = limit while @more build_response.each { |item| block.call(item) } @offset += @limit end end |