Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/arver/string.rb

Instance Method Summary collapse

Instance Method Details

#indent_onceObject

Returns an indented string, all lines of string will be indented with count of chars



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

def indent_once
  ("  ") + gsub(/(\n+)/) { $1 + ("  ") }
end