Class: Zm::Client::CosesCollection
- Inherits:
-
Base::ObjectsCollection
- Object
- Base::ObjectsCollection
- Zm::Client::CosesCollection
- Defined in:
- lib/zm/client/cos/coses_collection.rb
Overview
Collection coses
Constant Summary
Constants inherited from Base::ObjectsCollection
Base::ObjectsCollection::METHODS_MISSING_LIST
Instance Attribute Summary
Attributes inherited from Base::ObjectsCollection
Instance Method Summary collapse
- #find_by(hash, *attrs) ⇒ Object
-
#initialize(parent) ⇒ CosesCollection
constructor
A new instance of CosesCollection.
Methods inherited from Base::ObjectsCollection
#all, #all!, #attrs, #build_from_entry, #count, #find, #first, #method_missing, #new, #order, #page, #per_page, #respond_to_missing?, #where
Constructor Details
#initialize(parent) ⇒ CosesCollection
Returns a new instance of CosesCollection.
7 8 9 10 11 |
# File 'lib/zm/client/cos/coses_collection.rb', line 7 def initialize(parent) @child_class = Cos @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
#find_by(hash, *attrs) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/zm/client/cos/coses_collection.rb', line 13 def find_by(hash, *attrs) rep = sac.get_cos(hash.values.first, hash.keys.first, attrs.join(COMMA)) entry = rep[:Body][:GetCosResponse][:cos].first build_from_entry(entry) end |