Sha256: 5810acfa3d80a9f355097838a9c50837d22a7be342844f9033d1cc5b89745946
Contents?: true
Size: 429 Bytes
Versions: 25
Compression:
Stored size: 429 Bytes
Contents
module Nugrant module Helper class Yaml def self.format(string, options = {}) lines = string.send(string.respond_to?(:lines) ? :lines : :to_s).to_a lines = lines.drop(1) if options[:indent] indent_text = " " * options[:indent] lines = lines.map do |line| indent_text + line end end return lines.join("") end end end end
Version data entries
25 entries across 25 versions & 1 rubygems