class String

Public Instance Methods

indent(n) click to toggle source
# File lib/lucid/lang_extend.rb, line 11
def indent(n)
  if n >= 0
    gsub(/^/, ' ' * n)
  else
    gsub(/^ {0,#{-n}}/, '')
  end
end