Class: Nitpick::LocalVariableNitpicker

Class | Nitpick::LocalVariableNitpicker
In: | lib/nitpick/local_variable_nitpicker.rb
Parent: | LocalVariableCounter

### Methods

nitpick! process_iter

### Public Instance methods

nitpick!()

[Source]

    # File lib/nitpick/local_variable_nitpicker.rb, line 3
        def nitpick!
          super

          @lvars.each do |name, details|
            next if @args.include? name
            next if details[:calls] > 0
            # The first assignment is a use
            next if details[:uses] > 1
            warn Warnings::UnusedVariable.new(name)
          end
        end

process_iter(exp)

[Source]

    # File lib/nitpick/local_variable_nitpicker.rb, line 15
        def process_iter(exp)
          call = process(exp.shift)
          assignments = process(exp.shift)
          block = process(exp.shift)

          scan_for [Warnings::ShadowedVariable],
              :with => [assignments]

          s(:iter, call, assignments, block)
        end

[Validate]