Class: Megar::Folders

Inherits:
Object
  • Object
show all
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

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

#inboxObject

Returns the inbox folder



11
12
13
# File 'lib/megar/catalog/folders.rb', line 11

def inbox
  @inbox ||= find_by_type(3)
end

#rootObject

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

#trashObject

Returns the trash folder



16
17
18
# File 'lib/megar/catalog/folders.rb', line 16

def trash
  @trash ||= find_by_type(4)
end