Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rackbox/bin.rb

Instance Method Summary collapse

Instance Method Details

#indent(number_of_spaces = 1) ⇒ Object



5
6
7
# File 'lib/rackbox/bin.rb', line 5

def indent number_of_spaces = 1
  self.gsub(/^(.*)$/, (' ' * number_of_spaces) + '\1')
end