Sha256: 590fa509beac169d7a5d2f068a32e027ad8106ecb3db0cad7f0a6c9970119391
Contents?: true
Size: 338 Bytes
Versions: 1
Compression:
Stored size: 338 Bytes
Contents
module Envault class Formatter def self.escape_yaml(hash, quote = true) lines = [] hash.map do |k, v| lines << %Q{#{k}: #{quote ? v.inspect : v}} end lines.join("\n") end def self.write_escape_yaml(path, hash, quote = true) File.write(path, escape_yaml(hash, quote)) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
envault-0.2.2 | lib/envault/formatter.rb |