Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/rml.rb
Instance Method Summary collapse
Instance Method Details
#tab(n = 1) ⇒ Object
94 95 96 97 98 99 100 |
# File 'lib/rml.rb', line 94 def tab n=1 if self.count("\n") > 1 self.split("\r\n").collect { |s| "\t"*n + s }.join("\r\n") else "\t"*n + self end end |