Module: CodeStats::Languages::CComments
- Included in:
- Cpp, Java, JavaScript, Php
- Defined in:
- lib/code_stats/languages.rb
Instance Method Summary collapse
Instance Method Details
#code ⇒ Object
48 49 50 |
# File 'lib/code_stats/languages.rb', line 48 def code @code ||= text.substitute(/\/\*.+?\*\/\n?/m, '').substitute(/^\/\/.+?[\n\z]/m, '') end |