Class: Puppet::Network::HTTP::RackREST::RackFile
- Defined in:
- lib/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.
15 16 17 |
# File 'lib/puppet/network/http/rack/rest.rb', line 15 def initialize(file) @file = file end |
Instance Method Details
#close ⇒ Object
25 26 27 |
# File 'lib/puppet/network/http/rack/rest.rb', line 25 def close @file.close end |
#each ⇒ Object
19 20 21 22 23 |
# File 'lib/puppet/network/http/rack/rest.rb', line 19 def each while chunk = @file.read(CHUNK_SIZE) yield chunk end end |