# File lib/puppet/file_bucket/file.rb, line 123 def checksum_data(base_method) Puppet.info("Computing checksum on string") Puppet::Util::Checksums.method(base_method).call(@contents) end
# File lib/puppet/file_bucket/file.rb, line 119 def size @contents.size end
# File lib/puppet/file_bucket/file.rb, line 110 def stream(&block) s = StringIO.new(@contents) begin block.call(s) ensure s.close end end
# File lib/puppet/file_bucket/file.rb, line 128 def to_s # This is not so horrible as for FileContent, but still possible to mutate the content that the # checksum is based on... so semi horrible... return @contents; end
# File lib/puppet/file_bucket/file.rb, line 106 def initialize(content) @contents = content; end