Sha256: 0718a8ae46afb095c8743ea5ee9206e6bc01cb70c749c152f73350ace58e94d6
Contents?: true
Size: 779 Bytes
Versions: 10
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Layout # Checks if empty lines around the bodies of blocks match # the configuration. # # @example EnforcedStyle: no_empty_lines (default) # # good # # foo do |bar| # # ... # end # # @example EnforcedStyle: empty_lines # # good # # foo do |bar| # # # ... # # end class EmptyLinesAroundBlockBody < Base include EmptyLinesAroundBody extend AutoCorrector KIND = 'block' def on_block(node) first_line = node.send_node.last_line check(node, node.body, adjusted_first_line: first_line) end end end end end
Version data entries
10 entries across 10 versions & 2 rubygems