123456789_123456789_123456789_123456789_123456789_

Module: RuboCop::Ext::RegexpParser::Expression::CharacterSet

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/rubocop/ext/regexp_parser.rb

Overview

Provide CharacterSet with begin and end locations.

Instance Method Summary

Instance Method Details

#build_location

[ GitHub ]

  
# File 'lib/rubocop/ext/regexp_parser.rb', line 63

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