Sha256: f9d7b6148cee569432c848421606018add88956701cf18fc4b6c6c436f9f411b

Contents?: true

Size: 287 Bytes

Versions: 2

Compression:

Stored size: 287 Bytes

Contents

class String
  
  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

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xcodeide-0.1.0 lib/xcodeide/core_ext/string.rb
xcodeide-0.1.1 lib/xcodeide/core_ext/string.rb