class Rubocop::Cop::Lint::Loop
This cop checks for uses of *begin…end while/until something*.
Constants
- MSG
Public Instance Methods
on_until_post(node)
click to toggle source
Calls superclass method
# File lib/rubocop/cop/lint/loop.rb, line 16 def on_until_post(node) register_offence(node) super end
on_while_post(node)
click to toggle source
Calls superclass method
# File lib/rubocop/cop/lint/loop.rb, line 11 def on_while_post(node) register_offence(node) super end
Private Instance Methods
register_offence(node)
click to toggle source
# File lib/rubocop/cop/lint/loop.rb, line 23 def register_offence(node) add_offence(:warning, node.loc.keyword, MSG) end