class Deltacloud::Blob

Attributes

bucket[RW]

already has an id from basemodel (for the key)

content[RW]
content_length[RW]
content_type[RW]
last_modified[RW]
user_metadata[RW]

Public Instance Methods

to_hash(context) click to toggle source
# File lib/deltacloud/models/blob.rb, line 28
def to_hash(context)
  {
    :id => self.id,
    :href => context.bucket_url(bucket) + '/' + self.id,
    :bucket => { :rel => :bucket, :href => context.bucket_url(bucket), :id => bucket },
    :content_length => content_length,
    :content_type => content_type,
    :last_modified => last_modified,
    :content => content,
    :user_metadata => user_metadata
  }
end