Class: RubyCop::Ruby::RescueParams

Inherits:
List
  • Object
show all
Defined in:
lib/ruby_cop/ruby/params.rb

Instance Attribute Summary

Attributes inherited from List

#elements

Instance Method Summary collapse

Methods inherited from List

#add

Methods inherited from Node

#accept

Constructor Details

#initialize(types, var) ⇒ RescueParams

Returns a new instance of RescueParams.



10
11
12
13
14
15
16
17
18
# File 'lib/ruby_cop/ruby/params.rb', line 10

def initialize(types, var)
  if types
    errors = Ruby::Array.new(types)
    errors = Ruby::Assoc.new(errors, var) if var
    super(errors)
  else
    super()
  end
end