Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/xcodeide/core_ext/string.rb
Instance Method Summary collapse
Instance Method Details
#decomment ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/xcodeide/core_ext/string.rb', line 3 def decomment orig = self subd = orig.sub(/\/\*[^\*]*\*\//, '') subd = subd.sub(/\/\/.*\n/, '') until orig == subd orig = subd subd = orig.sub(/\/\*[^\*]*\*\//, '') subd = subd.sub(/\/\/.*\n/, '') end subd end |