Sha256: 5cada46175317d5b5ab48a1f276cf16464e6058887f558b8c4b3558e4bcd388b

Contents?: true

Size: 397 Bytes

Versions: 6

Compression:

Stored size: 397 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Cop
    module Style
      # This cop looks for uses of flip flop operator
      class FlipFlop < Cop
        MSG = 'Avoid the use of flip flop operators.'

        def on_iflipflop(node)
          add_offense(node, :expression)
        end

        def on_eflipflop(node)
          add_offense(node, :expression)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubocop-0.22.0 lib/rubocop/cop/style/flip_flop.rb
rubocop-0.21.0 lib/rubocop/cop/style/flip_flop.rb
rubocop-0.20.1 lib/rubocop/cop/style/flip_flop.rb
rubocop-0.20.0 lib/rubocop/cop/style/flip_flop.rb
rubocop-0.19.1 lib/rubocop/cop/style/flip_flop.rb
rubocop-0.19.0 lib/rubocop/cop/style/flip_flop.rb