indent_text( text, mod, first_line = true )
public
Write a text block with the current indent
# File lib/yaml/baseemitter.rb, line 103
def indent_text( text, mod, first_line = true )
return "" if text.to_s.empty?
spacing = indent( mod )
text = text.gsub( /\A([^\n])/, "#{ spacing }\\1" ) if first_line
return text.gsub( /\n^([^\n])/, "\n#{spacing}\\1" )
end