Sha256: 9a57da0d756f570b24319e31fe93a61d57ebf269ad9945f5272f665bc3f33687
Contents?: true
Size: 555 Bytes
Versions: 4
Compression:
Stored size: 555 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop module Lint # This cop checks for uses of *begin...end while/until something*. class Loop < Cop MSG = 'Use `Kernel#loop` with `break` rather than ' \ '`begin/end/until`(or `while`).' def on_while_post(node) register_offense(node) end def on_until_post(node) register_offense(node) end private def register_offense(node) add_offense(node, :keyword) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.22.0 | lib/rubocop/cop/lint/loop.rb |
rubocop-0.21.0 | lib/rubocop/cop/lint/loop.rb |
rubocop-0.20.1 | lib/rubocop/cop/lint/loop.rb |
rubocop-0.20.0 | lib/rubocop/cop/lint/loop.rb |