Class: Fog::Storage::Dropbox::Files
- Inherits:
-
Collection
- Object
- Collection
- Fog::Storage::Dropbox::Files
- Defined in:
- lib/fog/dropbox/models/storage/files.rb
Instance Method Summary collapse
- #get(key, options = {}, &block) ⇒ Object
- #head(key, options = {}) ⇒ Object
- #new(attributes = {}) ⇒ Object
Instance Method Details
#get(key, options = {}, &block) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/fog/dropbox/models/storage/files.rb', line 13 def get(key, = {}, &block) requires :directory = service.client.(key) new() rescue DropboxError nil end |
#head(key, options = {}) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/fog/dropbox/models/storage/files.rb', line 23 def head(key, = {}) requires :directory = service.client.(key) new() rescue DropboxError nil end |
#new(attributes = {}) ⇒ Object
33 34 35 36 37 |
# File 'lib/fog/dropbox/models/storage/files.rb', line 33 def new(attributes = {}) requires :directory attributes[:name] = attributes['path'].split('/').last super({ :directory => directory }.merge(attributes)) end |