Sha256: 3afcaa1aed53401d10a89cddf847e8f977f20500eaa9941b243bbc8569eaedec

Contents?: true

Size: 700 Bytes

Versions: 10

Compression:

Stored size: 700 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true

module RuboCop
  module Cop
    module Style
      # This cops checks if empty lines around the bodies of classes match the
      # configuration.
      #
      # @example
      #
      #   class Test
      #
      #      def something
      #        ...
      #      end
      #
      #   end
      #
      class EmptyLinesAroundClassBody < Cop
        include EmptyLinesAroundBody

        KIND = 'class'.freeze

        def on_class(node)
          _name, _superclass, body = *node
          check(node, body)
        end

        def on_sclass(node)
          _obj, body = *node
          check(node, body)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubocop-0.41.2 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.41.1 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.41.0 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.40.0 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.39.0 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.38.0 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.37.2 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.37.1 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.37.0 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.36.0 lib/rubocop/cop/style/empty_lines_around_class_body.rb