Class: CodeLexer::CommentRemover

Inherits:
AbstractorPiece show all
Defined in:
lib/code-lexer/abstractor.rb

Instance Method Summary collapse

Methods inherited from AbstractorPiece

#deabstract, #initialize

Constructor Details

This class inherits a constructor from CodeLexer::AbstractorPiece

Instance Method Details

#abstract(tokens) ⇒ Object



255
256
257
258
# File 'lib/code-lexer/abstractor.rb', line 255

def abstract(tokens)
    tokens.delete_if { |t| t.type == :comment }
    return tokens
end