Class: Nitpick::BranchNitpicker

Class | Nitpick::BranchNitpicker
In: | lib/nitpick/branch_nitpicker.rb
Parent: | Nitpicker

### Methods

process_if

### Public Instance methods

process_if(exp)

[Source]

    # File lib/nitpick/branch_nitpicker.rb, line 3
        def process_if(exp)
          cond = process(exp.shift)
          yes_branch = process(exp.shift)
          no_branch = process(exp.shift)

          scan_for [Warnings::UselessBranch, Warnings::IdenticalBranch],
               :with => [cond, yes_branch, no_branch]

          scan_for [Warnings::AssignmentAsCondition],
               :with => [cond]

          s(:if, cond, yes_branch, no_branch)
        end

[Validate]