class RuboCop::Cop::SketchupRequirements::Exit

Don't attempt to kill the Ruby interpreter by calling `exit` or `exit!`. SketchUp will trap `exit` and prevent that, with a message in the console. But `exit!` is not trapped and will terminate SketchUp without shutting down cleanly.

Use `return`, `next`, `break` or `raise` instead.

Constants

MSG

Public Instance Methods

on_send(node) click to toggle source
# File lib/rubocop/sketchup/cop/requirements/exit.rb, line 24
def on_send(node)
  return unless exit?(node)

  add_offense(node, location: :selector)
end