class RestClient::Payload::Streamed
Public Instance Methods
build_stream(params = nil)
click to toggle source
# File lib/restclient/payload.rb, line 112 def build_stream(params = nil) @stream = params end
length()
TODO (breaks compatibility): ought to use mime_for() to autodetect the Content-Type for stream objects that have a filename.
Alias for: size
size()
click to toggle source
# File lib/restclient/payload.rb, line 116 def size if @stream.respond_to?(:size) @stream.size elsif @stream.is_a?(IO) @stream.stat.size end end
Also aliased as: length