Class: String

Inherits:
Object
  • Object
show all
Includes:
SingularPluralDetection
Defined in:
lib/superdupe/string.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from SingularPluralDetection

#plural?, #singular?

Instance Method Details

#indent(spaces = 2) ⇒ Object



4
5
6
# File 'lib/superdupe/string.rb', line 4

def indent(spaces=2)
  split("\n").map {|l| (" " * spaces) + l }.join("\n")
end