class RuboCop::AST::NodePattern::Comment
A NodePattern comment, simplified version of ::Parser::Source::Comment
def ==(other)
-
(Boolean)-
Parameters:
-
other(Object) --
def ==(other) other.is_a?(Comment) && @location == other.location end
def initialize(range)
-
range(Parser::Source::Range) --
def initialize(range) @location = ::Parser::Source::Map.new(range) freeze end
def inspect
-
(String)- a human-readable representation of this comment
def inspect "#<NodePattern::Comment #{@location.expression} #{text.inspect}>" end
def text
-
(String)-
def text loc.expression.source.freeze end