Class: Fog::Storage::OpenStack::Directory
- Defined in:
- lib/fog/openstack/models/storage/directory.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/fog/openstack/models/storage/directory.rb', line 15 def destroy requires :key service.delete_container(key) true rescue Excon::Errors::NotFound false end |
#files ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/fog/openstack/models/storage/directory.rb', line 23 def files @files ||= begin Fog::Storage::OpenStack::Files.new( :directory => self, :service => service ) end end |
#public=(new_public) ⇒ Object
32 33 34 |
# File 'lib/fog/openstack/models/storage/directory.rb', line 32 def public=(new_public) @public = new_public end |
#public_url ⇒ Object
36 37 38 |
# File 'lib/fog/openstack/models/storage/directory.rb', line 36 def public_url raise NotImplementedError end |
#save ⇒ Object
40 41 42 43 44 |
# File 'lib/fog/openstack/models/storage/directory.rb', line 40 def save requires :key service.put_container(key) true end |