Method: Puppet::Util::FileParsing#to_file

Defined in:
lib/puppet/util/fileparsing.rb

#to_file(records) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generate a file from a bunch of hash records.



325
326
327
328
329
330
331
# File 'lib/puppet/util/fileparsing.rb', line 325

def to_file(records)
  text = records.collect { |record| to_line(record) }.join(line_separator)

  text += line_separator if trailing_separator

  text
end