Class: Faraday::CompositeReadIO
- Defined in:
- lib/faraday/upload_io.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Instance Method Summary collapse
-
#initialize(parts) ⇒ CompositeReadIO
constructor
A new instance of CompositeReadIO.
Constructor Details
#initialize(parts) ⇒ CompositeReadIO
Returns a new instance of CompositeReadIO.
14 15 16 17 18 |
# File 'lib/faraday/upload_io.rb', line 14 def initialize(parts) @length = parts.inject(0) { |sum, part| sum + part.length } ios = parts.map{ |part| part.to_io } super(*ios) end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
12 13 14 |
# File 'lib/faraday/upload_io.rb', line 12 def length @length end |