class String
def indent!(amount, indent_string=nil, indent_empty_lines=false)
Same as +indent+, except it indents the receiver in-place.
def indent!(amount, indent_string=nil, indent_empty_lines=false) indent_string = indent_string || self[/^[ \t]/] || ' ' re = indent_empty_lines ? /^/ : /^(?!$)/ gsub!(re, indent_string * amount) end