Method: RuboCop::Cop::Style::HashTransformValues#on_bad_to_h

Defined in:
lib/rubocop/cop/style/hash_transform_values.rb

#on_bad_to_h(node) ⇒ Object


71
72
73
74
75
76
77
78
# File 'lib/rubocop/cop/style/hash_transform_values.rb', line 71

def_node_matcher :on_bad_to_h, <<~PATTERN
  (block
    (call !#array_receiver? :to_h)
    (args
      (arg _key)
      (arg $_))
    (array $(lvar _key) $_))
PATTERN