Sha256: cc770289693d13eda9eb0ce04df433882cdeb50c8359881d5b1364eb9828ce54
Contents?: true
Size: 815 Bytes
Versions: 175
Compression:
Stored size: 815 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 alias on_numblock on_block end end end end
Version data entries
175 entries across 170 versions & 17 rubygems