Method: RuboCop::Cop::Style::RedundantArrayConstructor#redundant_array_constructor

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

#redundant_array_constructor(node) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/rubocop/cop/style/redundant_array_constructor.rb', line 33

def_node_matcher :redundant_array_constructor, "{\n  (send\n    (const {nil? cbase} :Array) :new\n    $(array ...))\n  (send\n    (const {nil? cbase} :Array) :[]\n    $...)\n  (send\n    nil? :Array\n    $(array ...))\n}\n"