Sha256: f5a18cd4378c52c660e0cf91d4ddbbe5d923c32c33b9371cabff0b74bf249b54

Contents?: true

Size: 309 Bytes

Versions: 4

Compression:

Stored size: 309 Bytes

Contents

# encoding: utf-8

module Rubocop
  module Cop
    module Style
      # This cop checks for BEGIN blocks.
      class BeginBlock < Cop
        MSG = 'Avoid the use of BEGIN blocks.'

        def on_preexe(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/begin_block.rb
rubocop-0.11.1 lib/rubocop/cop/style/begin_block.rb
rubocop-0.11.0 lib/rubocop/cop/style/begin_block.rb
rubocop-0.10.0 lib/rubocop/cop/style/begin_block.rb