Class: Puppet::Network::HTTP::RackREST::RackFile
- Defined in:
- lib/vendor/puppet/network/http/rack/rest.rb
Instance Method Summary collapse
- #close ⇒ Object
- #each ⇒ Object
-
#initialize(file) ⇒ RackFile
constructor
A new instance of RackFile.
Constructor Details
#initialize(file) ⇒ RackFile
Returns a new instance of RackFile.
14 15 16 |
# File 'lib/vendor/puppet/network/http/rack/rest.rb', line 14 def initialize(file) @file = file end |
Instance Method Details
#close ⇒ Object
24 25 26 |
# File 'lib/vendor/puppet/network/http/rack/rest.rb', line 24 def close @file.close end |
#each ⇒ Object
18 19 20 21 22 |
# File 'lib/vendor/puppet/network/http/rack/rest.rb', line 18 def each while chunk = @file.read(CHUNK_SIZE) yield chunk end end |