Class: Zm::Client::MountPointsCollection
- Inherits:
-
Base::ObjectsCollection
- Object
- Base::ObjectsCollection
- Zm::Client::MountPointsCollection
- Defined in:
- lib/zm/client/mountpoint/mountpoints_collection.rb
Overview
collection of mountpoints
Constant Summary collapse
- METHODS_MISSING_LIST =
i[select each map length].to_set.freeze
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Attributes inherited from Base::ObjectsCollection
Instance Method Summary collapse
- #all ⇒ Object
- #all! ⇒ Object
- #clear ⇒ Object
-
#initialize(parent) ⇒ MountPointsCollection
constructor
A new instance of MountPointsCollection.
- #new {|mountpoint| ... } ⇒ Object
- #where(view: nil, tr: nil) ⇒ Object
Methods inherited from Base::ObjectsCollection
#attrs, #build_from_entry, #count, #find, #first, #method_missing, #order, #page, #per_page, #respond_to_missing?
Constructor Details
#initialize(parent) ⇒ MountPointsCollection
Returns a new instance of MountPointsCollection.
11 12 13 14 15 |
# File 'lib/zm/client/mountpoint/mountpoints_collection.rb', line 11 def initialize(parent) @parent = parent @root = nil 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 Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
9 10 11 |
# File 'lib/zm/client/mountpoint/mountpoints_collection.rb', line 9 def root @root end |
Instance Method Details
#all ⇒ Object
30 31 32 |
# File 'lib/zm/client/mountpoint/mountpoints_collection.rb', line 30 def all @all || all! end |
#all! ⇒ Object
34 35 36 |
# File 'lib/zm/client/mountpoint/mountpoints_collection.rb', line 34 def all! build_response end |
#clear ⇒ Object
38 39 40 41 42 |
# File 'lib/zm/client/mountpoint/mountpoints_collection.rb', line 38 def clear @all = nil @root = nil reset_query_params end |
#new {|mountpoint| ... } ⇒ Object
17 18 19 20 21 |
# File 'lib/zm/client/mountpoint/mountpoints_collection.rb', line 17 def new mountpoint = MountPoint.new(@parent) yield(mountpoint) if block_given? mountpoint end |
#where(view: nil, tr: nil) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/zm/client/mountpoint/mountpoints_collection.rb', line 23 def where(view: nil, tr: nil) @view = view @tr = tr @all = nil self end |