Class: Zm::Client::FoldersCollection
- Inherits:
-
Base::AccountObjectsCollection
- Object
- Base::ObjectsCollection
- Base::AccountObjectsCollection
- Zm::Client::FoldersCollection
- Defined in:
- lib/zm/client/folder/folders_collection.rb
Overview
collection of folders
Constant Summary
Constants inherited from Base::ObjectsCollection
Base::ObjectsCollection::METHODS_MISSING_LIST
Instance Attribute Summary collapse
-
#depth ⇒ Object
Returns the value of attribute depth.
-
#needGranteeName ⇒ Object
Returns the value of attribute needGranteeName.
-
#tr ⇒ Object
Returns the value of attribute tr.
-
#view ⇒ Object
Returns the value of attribute view.
-
#visible ⇒ Object
Returns the value of attribute visible.
Attributes inherited from Base::ObjectsCollection
Instance Method Summary collapse
- #appointment ⇒ Object
- #build_query ⇒ Object
- #clear ⇒ Object
- #contact ⇒ Object
- #document ⇒ Object
-
#find(id) ⇒ Object
TODO: forcer id en string.
- #ids ⇒ Object
-
#initialize(parent) ⇒ FoldersCollection
constructor
A new instance of FoldersCollection.
- #jsns_builder ⇒ Object
- #message ⇒ Object
- #root ⇒ Object
- #task ⇒ Object
- #where(view: nil, tr: nil) ⇒ Object
Methods inherited from Base::ObjectsCollection
#all, #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) ⇒ FoldersCollection
Returns a new instance of FoldersCollection.
9 10 11 12 13 14 15 |
# File 'lib/zm/client/folder/folders_collection.rb', line 9 def initialize(parent) @child_class = Folder @builder_class = FoldersBuilder super @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
#depth ⇒ Object
Returns the value of attribute depth.
7 8 9 |
# File 'lib/zm/client/folder/folders_collection.rb', line 7 def depth @depth end |
#needGranteeName ⇒ Object
Returns the value of attribute needGranteeName.
7 8 9 |
# File 'lib/zm/client/folder/folders_collection.rb', line 7 def needGranteeName @needGranteeName end |
#tr ⇒ Object
Returns the value of attribute tr.
7 8 9 |
# File 'lib/zm/client/folder/folders_collection.rb', line 7 def tr @tr end |
#view ⇒ Object
Returns the value of attribute view.
7 8 9 |
# File 'lib/zm/client/folder/folders_collection.rb', line 7 def view @view end |
#visible ⇒ Object
Returns the value of attribute visible.
7 8 9 |
# File 'lib/zm/client/folder/folders_collection.rb', line 7 def visible @visible end |
Instance Method Details
#appointment ⇒ Object
50 51 52 53 |
# File 'lib/zm/client/folder/folders_collection.rb', line 50 def appointment @view = FolderDefault::CALENDAR.type self end |
#build_query ⇒ Object
76 77 78 |
# File 'lib/zm/client/folder/folders_collection.rb', line 76 def build_query jsns_builder.to_jsns end |
#clear ⇒ Object
40 41 42 43 |
# File 'lib/zm/client/folder/folders_collection.rb', line 40 def clear @root = nil reset_query_params end |
#contact ⇒ Object
55 56 57 58 |
# File 'lib/zm/client/folder/folders_collection.rb', line 55 def contact @view = FolderDefault::CONTACTS.type self end |
#document ⇒ Object
45 46 47 48 |
# File 'lib/zm/client/folder/folders_collection.rb', line 45 def document @view = FolderDefault::BRIEFCASE.type self end |
#find(id) ⇒ Object
TODO: forcer id en string
18 19 20 21 22 23 24 |
# File 'lib/zm/client/folder/folders_collection.rb', line 18 def find(id) folder = @child_class.new(@parent) do |f| f.id = id end folder.reload! folder end |
#ids ⇒ Object
36 37 38 |
# File 'lib/zm/client/folder/folders_collection.rb', line 36 def ids @builder_class.new(@parent, make_query).ids end |
#jsns_builder ⇒ Object
70 71 72 73 74 |
# File 'lib/zm/client/folder/folders_collection.rb', line 70 def jsns_builder return @jsns_builder if defined? @jsns_builder @jsns_builder = FoldersJsnsBuilder.new(self) end |
#message ⇒ Object
60 61 62 63 |
# File 'lib/zm/client/folder/folders_collection.rb', line 60 def @view = FolderDefault::INBOX.type self end |
#root ⇒ Object
26 27 28 |
# File 'lib/zm/client/folder/folders_collection.rb', line 26 def root find(1) end |
#task ⇒ Object
65 66 67 68 |
# File 'lib/zm/client/folder/folders_collection.rb', line 65 def task @view = FolderDefault::TASKS.type self end |
#where(view: nil, tr: nil) ⇒ Object
30 31 32 33 34 |
# File 'lib/zm/client/folder/folders_collection.rb', line 30 def where(view: nil, tr: nil) @view = view @tr = tr self end |