Class: Nitpick::RescueNitpicker

Inherits:
Nitpicker
  • Object
show all
Defined in:
lib/nitpick/rescue_nitpicker.rb

Instance Attribute Summary

Attributes inherited from Nitpicker

#warnings

Instance Method Summary collapse

Methods inherited from Nitpicker

#initialize, #nitpick!, #process_cfunc, #process_defn, #scan_for, #warn

Constructor Details

This class inherits a constructor from Nitpick::Nitpicker

Instance Method Details

#process_resbody(exp) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/nitpick/rescue_nitpicker.rb', line 3

def process_resbody(exp)
  exceptions = exp.shift
  rescue_value = exp.shift
  
  scan_for [Warnings::RescueValue, Warnings::RescueEverything],
       :with => [exceptions, rescue_value]
  
  exp.clear

  s(:resbody, exceptions, rescue_value)
end