Class: Zm::Client::SharesCollection

Inherits:
Base::ObjectsCollection show all
Defined in:
lib/zm/client/share/shares_collection.rb

Overview

collection of shares

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!, #build_from_entry, #find, #first, #logger, #method_missing, #order, #page, #per_page, #respond_to_missing?

Constructor Details

#initialize(parent) ⇒ SharesCollection

Returns a new instance of SharesCollection.



7
8
9
10
# File 'lib/zm/client/share/shares_collection.rb', line 7

def initialize(parent)
  @parent = parent
  reset_query_params
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(json) {|share| ... } ⇒ Object

Yields:

  • (share)


12
13
14
15
16
# File 'lib/zm/client/share/shares_collection.rb', line 12

def new(json)
  share = Share.new(@parent, json)
  yield(share) if block_given?
  share
end

#where(owner_name: nil) ⇒ Object



18
19
20
21
# File 'lib/zm/client/share/shares_collection.rb', line 18

def where(owner_name: nil)
  @owner_name = owner_name
  self
end