lib/net/amazon/s3/object.rb
# Gets this object's value.
# 
# When called with a block, yields the value in chunks as it is read in from
# the socket.
Gets this object's value.
When called with a block, yields the value in chunks as it is read in from
the socket.
Gets this object ' s value . When called with a block yields the value in chunks as it is read in from the socket .
def value
      key_escaped = Object.escape_key(@key)
      if block_given?
        @s3.request_get("/#{@bucket.name}/#{key_escaped}") do |response|
          @s3.error?(response)
          response.read_body {|chunk| yield chunk }
        end
      else
        response = @s3.request_get("/#{@bucket.name}/#{key_escaped}")
        @s3.error?(response)
        return response.body
      end
    end
def value key_escaped = Object . escape_key ( @key ) if block_given? @s3 . request_get ( "/#{@bucket.name}/#{key_escaped}" ) do | response | @s3 . error? ( response ) response . read_body { | chunk | yield chunk } end else response = @s3 . request_get ( "/#{@bucket.name}/#{key_escaped}" ) @s3 . error? ( response ) return response . body end end
Gets this object's value.
Gets this object ' s value .