Class: Gobbler::Folder
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.list(opts = {}) ⇒ Array<Folder>
An array of Folders.
Instance Method Summary collapse
-
#assets ⇒ Hash
The assets for this folder.
-
#guid ⇒ String
The guid for the folder.
-
#volume ⇒ Volume
The volume that this folder is on.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Gobbler::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Gobbler::Base
Class Method Details
.list(opts = {}) ⇒ Array<Folder>
Returns An array of Folders.
15 16 17 18 |
# File 'lib/gobbler/folder.rb', line 15 def self.list(opts = {}) opts[:offset] ||= 0 ::Gobbler.request("client_catalog/sync_ask_folder", options: opts)["updates"].map {|folder| new(folder)} end |
Instance Method Details
#assets ⇒ Hash
Returns The assets for this folder.
31 32 33 |
# File 'lib/gobbler/folder.rb', line 31 def assets ::Gobbler.unpack json["dir"]["assets_packed"] end |
#guid ⇒ String
Returns The guid for the folder.
21 22 23 |
# File 'lib/gobbler/folder.rb', line 21 def guid user_data_guid end |
#volume ⇒ Volume
Returns The volume that this folder is on.
26 27 28 |
# File 'lib/gobbler/folder.rb', line 26 def volume ::Gobbler::Volume.get(volume_guid) end |