Sha256: cf04283c489881627d762e2fa0dbe757c36abac7cec75d7609e2293bb513050c

Contents?: true

Size: 751 Bytes

Versions: 4

Compression:

Stored size: 751 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 blocks match
      # the configuration.
      #
      # @example
      #
      #   # EnforcedStyle: empty_lines
      #
      #   # good
      #
      #   foo do |bar|
      #
      #     ...
      #
      #   end
      #
      #   # EnforcedStyle: no_empty_lines
      #
      #   # good
      #
      #   foo do |bar|
      #     ...
      #   end
      class EmptyLinesAroundBlockBody < Cop
        include EmptyLinesAroundBody

        KIND = 'block'.freeze

        def on_block(node)
          _send, _args, 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_block_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_block_body.rb
rubocop-0.43.0 lib/rubocop/cop/style/empty_lines_around_block_body.rb
rubocop-0.42.0 lib/rubocop/cop/style/empty_lines_around_block_body.rb