Sha256: 6469dded0ed387f4ca294d9d18be3dc52ead44e6f4a5aa8814eb3db3525cbc4a

Contents?: true

Size: 798 Bytes

Versions: 4

Compression:

Stored size: 798 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module Layout
      # This cops checks if empty lines around the bodies of modules match
      # the configuration.
      #
      # @example
      #
      #   EnforcedStyle: empty_lines
      #
      #   # good
      #
      #   module Foo
      #
      #     def bar
      #       ...
      #     end
      #
      #   end
      #
      #   EnforcedStyle: no_empty_lines
      #
      #   # good
      #
      #   module Foo
      #     def bar
      #       ...
      #     end
      #   end
      class EmptyLinesAroundModuleBody < Cop
        include EmptyLinesAroundBody

        KIND = 'module'.freeze

        def on_module(node)
          _name, body = *node
          check(node, body)
        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_module_body.rb
rubocop-0.50.0 lib/rubocop/cop/layout/empty_lines_around_module_body.rb
rubocop-0.49.1 lib/rubocop/cop/layout/empty_lines_around_module_body.rb
rubocop-0.49.0 lib/rubocop/cop/layout/empty_lines_around_module_body.rb