Class: Fog::Rackspace::Storage::Directory
- Extended by:
- Deprecation
- Defined in:
- lib/fog/rackspace/models/storage/directory.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods included from Deprecation
Methods inherited from Model
#collection, #initialize, #inspect, #reload, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #identity, #identity=, #merge_attributes, #new_record?, #requires
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/fog/rackspace/models/storage/directory.rb', line 18 def destroy requires :key connection.delete_container(key) true rescue Excon::Errors::NotFound false end |
#files ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/fog/rackspace/models/storage/directory.rb', line 26 def files @files ||= begin Fog::Rackspace::Storage::Files.new( :directory => self, :connection => connection ) end end |
#save ⇒ Object
35 36 37 38 39 |
# File 'lib/fog/rackspace/models/storage/directory.rb', line 35 def save requires :key connection.put_container(key) true end |