Method: RuboCop::AST::NodePattern::Parser::WithMeta::Lexer#pos

Defined in:
lib/rubocop/ast/node_pattern/with_meta.rb

#pos::Parser::Source::Range

Returns last match’s position.

Returns:

  • (::Parser::Source::Range)

    last match’s position



33
34
35
# File 'lib/rubocop/ast/node_pattern/with_meta.rb', line 33

def pos
  ::Parser::Source::Range.new(source_buffer, ss.pos - ss.matched_size, ss.pos)
end