Class: Buckets::BucketMetaObject

Inherits:
Object
  • Object
show all
Defined in:
lib/buckets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ BucketMetaObject

Returns a new instance of BucketMetaObject.



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/buckets.rb', line 83

def initialize(*args)
  @properties         = args.first
  @bucket_name        = @properties[:bucket_name]
  @key                = @properties[:key]
  @last_modified      = @properties[:last_modified]
  @e_tag              = @properties[:e_tag]
  @size               = @properties[:size]
  @storage_class      = @properties[:storage_class]
  @owner_id           = @properties[:owner_id]
  @owner_display_name = @properties[:owner_display_name]
end

Instance Attribute Details

#bucket_nameObject

Returns the value of attribute bucket_name.



78
79
80
# File 'lib/buckets.rb', line 78

def bucket_name
  @bucket_name
end

#e_tagObject

Returns the value of attribute e_tag.



78
79
80
# File 'lib/buckets.rb', line 78

def e_tag
  @e_tag
end

#keyObject

Returns the value of attribute key.



78
79
80
# File 'lib/buckets.rb', line 78

def key
  @key
end

#last_modifiedObject

Returns the value of attribute last_modified.



78
79
80
# File 'lib/buckets.rb', line 78

def last_modified
  @last_modified
end

#owner_display_nameObject

Returns the value of attribute owner_display_name.



78
79
80
# File 'lib/buckets.rb', line 78

def owner_display_name
  @owner_display_name
end

#owner_idObject

Returns the value of attribute owner_id.



78
79
80
# File 'lib/buckets.rb', line 78

def owner_id
  @owner_id
end

#propertiesObject

Returns the value of attribute properties.



78
79
80
# File 'lib/buckets.rb', line 78

def properties
  @properties
end

#sizeObject

Returns the value of attribute size.



78
79
80
# File 'lib/buckets.rb', line 78

def size
  @size
end

#storage_classObject

Returns the value of attribute storage_class.



78
79
80
# File 'lib/buckets.rb', line 78

def storage_class
  @storage_class
end

Instance Method Details

#objectObject



95
96
97
# File 'lib/buckets.rb', line 95

def object
  @object ||= object!
end

#object!Object



99
100
101
# File 'lib/buckets.rb', line 99

def object!
  CryptKeeper::Connection.http_instance.get("/#{URI.escape(@key)}", @bucket_name)
end