Sha256: 7bcb636f0cf6672778ded20df63976907288b30ea32a8797a249e727aea2b0b2

Contents?: true

Size: 755 Bytes

Versions: 4

Compression:

Stored size: 755 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
      #
      #   EnforcedStyle: empty_lines
      #
      #   # good
      #
      #   class Foo
      #
      #      def bar
      #        ...
      #      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

4 entries across 4 versions & 2 rubygems

Version Path
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/rubocop-0.42.0/lib/rubocop/cop/style/empty_lines_around_class_body.rb
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/rubocop-0.42.0/lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.43.0 lib/rubocop/cop/style/empty_lines_around_class_body.rb
rubocop-0.42.0 lib/rubocop/cop/style/empty_lines_around_class_body.rb