Class: RuboCop::Ext::RegexpParser::Map

Inherits:
Parser::Source::Map
  • Object
show all
Defined in:
lib/rubocop/ext/regexp_parser.rb

Overview

Source map for RegexpParser nodes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression, body:, quantifier: nil, begin_l: nil, end_l: nil) ⇒ Map

Returns a new instance of Map.


11
12
13
14
15
16
17
# File 'lib/rubocop/ext/regexp_parser.rb', line 11

def initialize(expression, body:, quantifier: nil, begin_l: nil, end_l: nil)
  @begin = begin_l
  @end = end_l
  @body = body
  @quantifier = quantifier
  super(expression)
end

Instance Attribute Details

#beginObject (readonly)

Returns the value of attribute begin


9
10
11
# File 'lib/rubocop/ext/regexp_parser.rb', line 9

def begin
  @begin
end

#bodyObject (readonly)

Returns the value of attribute body


9
10
11
# File 'lib/rubocop/ext/regexp_parser.rb', line 9

def body
  @body
end

#endObject (readonly)

Returns the value of attribute end


9
10
11
# File 'lib/rubocop/ext/regexp_parser.rb', line 9

def end
  @end
end

#quantifierObject (readonly)

Returns the value of attribute quantifier


9
10
11
# File 'lib/rubocop/ext/regexp_parser.rb', line 9

def quantifier
  @quantifier
end