Sha256: df4f4a0e30f978c4ca081a64218d7f259abcb6889f887457d6117789e560485b

Contents?: true

Size: 334 Bytes

Versions: 4

Compression:

Stored size: 334 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Cop
    module Style
      # This cop checks for END blocks.
      class EndBlock < Cop
        MSG = 'Avoid the use of END blocks. Use `Kernel#at_exit` instead.'

        def on_postexe(node)
          add_offence(:convention, node.loc.keyword, MSG)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.12.0 lib/rubocop/cop/style/end_block.rb
rubocop-0.11.1 lib/rubocop/cop/style/end_block.rb
rubocop-0.11.0 lib/rubocop/cop/style/end_block.rb
rubocop-0.10.0 lib/rubocop/cop/style/end_block.rb