Class: XamarinTestCloud::HTTP::Payload::Streamed
- Defined in:
- lib/xamarin-test-cloud/http/payload.rb
Instance Method Summary collapse
- #build_stream(params = nil) ⇒ Object
- #size ⇒ Object (also: #length)
Methods inherited from Base
#close, #flatten_params, #flatten_params_array, #headers, #initialize, #inspect, #read, #short_inspect
Constructor Details
This class inherits a constructor from XamarinTestCloud::HTTP::Payload::Base
Instance Method Details
#build_stream(params = nil) ⇒ Object
153 154 155 |
# File 'lib/xamarin-test-cloud/http/payload.rb', line 153 def build_stream(params = nil) @stream = params end |
#size ⇒ Object Also known as: length
157 158 159 160 161 162 163 |
# File 'lib/xamarin-test-cloud/http/payload.rb', line 157 def size if @stream.respond_to?(:size) @stream.size elsif @stream.is_a?(IO) @stream.stat.size end end |