Sha256: 12aa04e7a54235d0184b6063a4a700a29b0a6ff6494fd9e429fa7ec7928b5c8f
Contents?: true
Size: 946 Bytes
Versions: 8
Compression:
Stored size: 946 Bytes
Contents
require 'fog/core/model' require 'fog/rackspace/models/storage/files' module Fog module Rackspace class Storage class Directory < Fog::Model extend Fog::Deprecation deprecate(:name, :key) deprecate(:name=, :key=) identity :key, :aliases => 'name' attribute :bytes, :aliases => 'X-Container-Bytes-Used' attribute :count, :aliases => 'X-Container-Object-Count' def destroy requires :key connection.delete_container(key) true rescue Excon::Errors::NotFound false end def files @files ||= begin Fog::Rackspace::Storage::Files.new( :directory => self, :connection => connection ) end end def save requires :key connection.put_container(key) true end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems