Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/dashcode-converter.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#indent(str) ⇒ Object
38 39 40 |
# File 'lib/dashcode-converter.rb', line 38 def indent(str) self.gsub(/^/, str) end |
#remove_indent ⇒ Object
33 34 35 36 37 |
# File 'lib/dashcode-converter.rb', line 33 def remove_indent match= self.match(/(^\s+)/) return self unless match self.gsub(/^#{match[1]}/, '').strip end |