Module: RuboCop::Ext::RegexpParser::Expression::CharacterSet
- Included in:
- RuboCop::Ext::RegexpParser
- Defined in:
- lib/rubocop/ext/regexp_parser.rb
Overview
Provide `CharacterSet` with `begin` and `end` locations.
Instance Method Summary collapse
Instance Method Details
#build_location ⇒ Object
81 82 83 84 85 86 87 88 |
# File 'lib/rubocop/ext/regexp_parser.rb', line 81 def build_location h = super body = h[:body] h.merge!( begin_l: body.with(end_pos: body.begin_pos + 1), end_l: body.with(begin_pos: body.end_pos - 1) ) end |