Method: RuboCop::Cop::Lint::DuplicateSetElement#set_init_elements

Defined in:
lib/rubocop/cop/lint/duplicate_set_element.rb

#set_init_elements(node) ⇒ Object

[View source]

46
47
48
49
50
51
52
# File 'lib/rubocop/cop/lint/duplicate_set_element.rb', line 46

def_node_matcher :set_init_elements, <<~PATTERN
  {
    (send (const {nil? cbase} {:Set :SortedSet}) :[] $...)
    (send (const {nil? cbase} {:Set :SortedSet}) :new (array $...))
    (call (array $...) :to_set)
  }
PATTERN