Sha256: 96478c9da2372c0d5a226c867c58b36ea080fe21c67edb09341b6ec3dfb13f8a

Contents?: true

Size: 654 Bytes

Versions: 4

Compression:

Stored size: 654 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module Layout
      # This cops checks if empty lines exist around the bodies of begin-end
      # blocks.
      #
      # @example
      #
      #   # good
      #
      #   begin
      #     ...
      #   end
      #
      #   # bad
      #
      #   begin
      #
      #     ...
      #
      #   end
      class EmptyLinesAroundBeginBody < Cop
        include EmptyLinesAroundBody

        KIND = '`begin`'.freeze

        def on_kwbegin(node)
          check(node, nil)
        end

        private

        def style
          :no_empty_lines
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.51.0 lib/rubocop/cop/layout/empty_lines_around_begin_body.rb
rubocop-0.50.0 lib/rubocop/cop/layout/empty_lines_around_begin_body.rb
rubocop-0.49.1 lib/rubocop/cop/layout/empty_lines_around_begin_body.rb
rubocop-0.49.0 lib/rubocop/cop/layout/empty_lines_around_begin_body.rb