Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/gorp/edit.rb

Instance Method Summary collapse

Instance Method Details

#indent(n) ⇒ Object



5
6
7
# File 'lib/gorp/edit.rb', line 5

def indent(n)
  gsub /^/, ' '*n
end

#unindent(n) ⇒ Object



2
3
4
# File 'lib/gorp/edit.rb', line 2

def unindent(n)
  gsub Regexp.new("^#{' '*n}"), ''
end