Class: Nitpick::BlockNitpicker

Class | Nitpick::BlockNitpicker
In: | lib/nitpick/block_nitpicker.rb
Parent: | Nitpicker

### Methods

process_if process_yield

### Public Instance methods

process_if(exp)

[Source]

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

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

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

process_yield(exp)

[Source]

    # File lib/nitpick/block_nitpicker.rb, line 14
        def process_yield(exp)
          exp.clear
          warn Warnings::UnprotectedBlock.new

          s(:yield)
        end

[Validate]