Method: RuboCop::Cop::InternalAffairs::LocationExists#replaceable_with_loc

Defined in:
lib/rubocop/cop/internal_affairs/location_exists.rb

#replaceable_with_loc(node) ⇒ Object



69
70
71
72
73
74
75
76
# File 'lib/rubocop/cop/internal_affairs/location_exists.rb', line 69

def_node_matcher :replaceable_with_loc, <<~PATTERN
  (and
    (call
      (call $_receiver :loc) :respond_to?
      $(sym _location))
    (call
      (call _receiver :loc) _location))
PATTERN