class Swa::S3::Object

Public Instance Methods

delete() click to toggle source
# File lib/swa/s3/object.rb, line 40
def delete
  object.delete
end
get_body() click to toggle source
# File lib/swa/s3/object.rb, line 28
def get_body
  object.get.body
end
key() click to toggle source
# File lib/swa/s3/object.rb, line 16
def key
  object.key
end
put(io, options = {}) click to toggle source
# File lib/swa/s3/object.rb, line 32
def put(io, options = {})
  object.put(options.merge(:body => io))
end
summary() click to toggle source
# File lib/swa/s3/object.rb, line 8
def summary
  [
    object.last_modified.iso8601,
    rpad(object.size, 10),
    uri
  ].join("  ")
end
to_s() click to toggle source
# File lib/swa/s3/object.rb, line 24
def to_s
  uri
end
upload(file_name) click to toggle source
# File lib/swa/s3/object.rb, line 36
def upload(file_name)
  object.upload_file(file_name)
end
uri() click to toggle source
# File lib/swa/s3/object.rb, line 20
def uri
  "s3://#{object.bucket.name}/#{object.key}"
end