Sha256: 503de2daf7ae6b4c0a99375aa4a227180fa7c839c6466d3f8734a44be2e809f8

Contents?: true

Size: 815 Bytes

Versions: 4

Compression:

Stored size: 815 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 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 & 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_module_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_module_body.rb
rubocop-0.43.0 lib/rubocop/cop/style/empty_lines_around_module_body.rb
rubocop-0.42.0 lib/rubocop/cop/style/empty_lines_around_module_body.rb