Class: Zm::Client::FoldersCollection
Overview
Constant Summary
collapse
- METHODS_MISSING_LIST =
%i[select each map length].to_set.freeze
Instance Attribute Summary collapse
#parent
Instance Method Summary
collapse
#attrs, #build_from_entry, #count, #find, #first, #method_missing, #order, #page, #per_page, #respond_to_missing?
Constructor Details
Returns a new instance of FoldersCollection.
11
12
13
14
15
|
# File 'lib/zm/client/folder/folders_collection.rb', line 11
def initialize(parent)
@parent = parent
@root = nil
reset_query_params
end
|
Instance Attribute Details
#root ⇒ Object
Returns the value of attribute root.
9
10
11
|
# File 'lib/zm/client/folder/folders_collection.rb', line 9
def root
@root
end
|
Instance Method Details
#all ⇒ Object
35
36
37
|
# File 'lib/zm/client/folder/folders_collection.rb', line 35
def all
@all || all!
end
|
#all! ⇒ Object
39
40
41
|
# File 'lib/zm/client/folder/folders_collection.rb', line 39
def all!
build_response
end
|
#clear ⇒ Object
43
44
45
46
47
|
# File 'lib/zm/client/folder/folders_collection.rb', line 43
def clear
@all = nil
@root = nil
reset_query_params
end
|
#ids ⇒ Object
30
31
32
33
|
# File 'lib/zm/client/folder/folders_collection.rb', line 30
def ids
fb = FoldersBuilder.new @parent, make_query
fb.ids
end
|
#new {|folder| ... } ⇒ Object
17
18
19
20
21
|
# File 'lib/zm/client/folder/folders_collection.rb', line 17
def new
folder = Folder.new(@parent)
yield(folder) if block_given?
folder
end
|
#where(view: nil, tr: nil) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/zm/client/folder/folders_collection.rb', line 23
def where(view: nil, tr: nil)
@view = view
@tr = tr
@all = nil
self
end
|