Sha256: e68f6097ed0a6edef3c732228df50057fa290b1a9b752fbb1ce3c351680dc993
Contents?: true
Size: 503 Bytes
Versions: 45
Compression:
Stored size: 503 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Style # This cop checks for END blocks. # # @example # # bad # END { puts 'Goodbye!' } # # # good # at_exit { puts 'Goodbye!' } # class EndBlock < Cop MSG = 'Avoid the use of `END` blocks. ' \ 'Use `Kernel#at_exit` instead.' def on_postexe(node) add_offense(node, location: :keyword) end end end end end
Version data entries
45 entries across 26 versions & 3 rubygems