Method: RuboCop::Cop::Style::HashTransformValues#on_bad_each_with_object
- Defined in:
- lib/rubocop/cop/style/hash_transform_values.rb
#on_bad_each_with_object(node) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rubocop/cop/style/hash_transform_values.rb', line 34 def_node_matcher :on_bad_each_with_object, <<~PATTERN (block (call !#array_receiver? :each_with_object (hash)) (args (mlhs (arg _key) (arg $_)) (arg _memo)) (call (lvar _memo) :[]= $(lvar _key) $!`_memo)) PATTERN |