Class: Faraday::CompositeReadIO
- Inherits:
-
CompositeReadIO
- Object
- CompositeReadIO
- Faraday::CompositeReadIO
- Defined in:
- lib/faraday/upload_io.rb
Instance Attribute Summary (collapse)
-
- (Object) length
readonly
Returns the value of attribute length.
Instance Method Summary (collapse)
-
- (CompositeReadIO) initialize(parts)
constructor
A new instance of CompositeReadIO.
Constructor Details
- (CompositeReadIO) initialize(parts)
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
- (Object) length (readonly)
Returns the value of attribute length
12 13 14 |
# File 'lib/faraday/upload_io.rb', line 12 def length @length end |