Class: Megar::Folders
- Inherits:
-
Object
- Object
- Megar::Folders
- Includes:
- CatalogItem
- Defined in:
- lib/megar/catalog/folders.rb
Overview
Collection manager for folders
Instance Attribute Summary
Attributes included from CatalogItem
#id, #key, #name, #parent_folder_id, #payload, #session, #type
Instance Method Summary collapse
-
#inbox ⇒ Object
Returns the inbox folder.
-
#root ⇒ Object
Returns the root (cloud drive) folder.
-
#trash ⇒ Object
Returns the trash folder.
Methods included from CatalogItem
#==, #[], #add, #attributes=, #collection, #default_parent_folder, #each, #find_all_by_parent_folder_id, #find_all_by_type, #find_by_id, #find_by_name, #find_by_type, #initialize, #parent_folder, #reset!, #resource_class
Instance Method Details
#inbox ⇒ Object
Returns the inbox folder
11 12 13 |
# File 'lib/megar/catalog/folders.rb', line 11 def inbox @inbox ||= find_by_type(3) end |
#root ⇒ Object
Returns the root (cloud drive) folder
6 7 8 |
# File 'lib/megar/catalog/folders.rb', line 6 def root @root ||= find_by_type(2) end |
#trash ⇒ Object
Returns the trash folder
16 17 18 |
# File 'lib/megar/catalog/folders.rb', line 16 def trash @trash ||= find_by_type(4) end |