Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/mutate/api.rb
Instance Method Summary collapse
-
#indent(char, count) ⇒ Object
Returns an indented string, all lines of string will be indented with count of chars.
Instance Method Details
#indent(char, count) ⇒ Object
Returns an indented string, all lines of string will be indented with count of chars
5 6 7 |
# File 'lib/mutate/api.rb', line 5 def indent(char, count) (char * count) + gsub(/(\n+)/) { $1 + (char * count) } end |