class Object
Public Instance Methods
indent(count, char = ' ')
click to toggle source
# File lib/yaml-vfs/utils.rb, line 13 def indent(count, char = ' ') gsub(/([^\n]*)(\n|$)/) do last_iteration = ($1 == '' && $2 == '') line = '' line << (char * count) unless last_iteration line << $1 line << $2 line end end