Method: Puppet::FileBucket::File::StringContents#stream

Defined in:
lib/puppet/file_bucket/file.rb

#stream(&block) ⇒ Object



82
83
84
85
86
87
88
89
# File 'lib/puppet/file_bucket/file.rb', line 82

def stream(&block)
  s = StringIO.new(@contents)
  begin
    block.call(s)
  ensure
    s.close
  end
end