Class: Fog::Brightbox::Storage::Directory
- Inherits:
-
Model
- Object
- Model
- Fog::Brightbox::Storage::Directory
- Defined in:
- lib/fog/brightbox/models/storage/directory.rb
Instance Attribute Summary collapse
-
#public ⇒ Object
writeonly
Sets the attribute public.
Instance Method Summary collapse
Instance Attribute Details
#public=(value) ⇒ Object (writeonly)
Sets the attribute public
31 32 33 |
# File 'lib/fog/brightbox/models/storage/directory.rb', line 31 def public=(value) @public = value end |
Instance Method Details
#destroy ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/fog/brightbox/models/storage/directory.rb', line 14 def destroy requires :key service.delete_container(key) true rescue Excon::Errors::NotFound false end |
#files ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/fog/brightbox/models/storage/directory.rb', line 22 def files @files ||= begin Fog::Brightbox::Storage::Files.new( directory: self, service: service ) end end |
#public_url ⇒ Object
33 34 35 36 37 |
# File 'lib/fog/brightbox/models/storage/directory.rb', line 33 def public_url requires :key @public_url ||= ::File.join(service.management_url.to_s, Fog::Brightbox::Storage.escape(key, "/")) end |
#save ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/fog/brightbox/models/storage/directory.rb', line 39 def save requires :key = { read_permissions: , write_permissions: } service.put_container(key, ) true end |