Sha256: 883c4f947a4919165df70abcb14432a746243a4f40e11a47d20762d2868a2571
Contents?: true
Size: 502 Bytes
Versions: 6790
Compression:
Stored size: 502 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # Common functionality for checking minimum body length. module MinBodyLength private def min_body_length?(node) (node.loc.end.line - node.loc.keyword.line) > min_body_length end def min_body_length length = cop_config['MinBodyLength'] || 1 return length if length.is_a?(Integer) && length > 0 raise 'MinBodyLength needs to be a positive integer!' end end end end
Version data entries
6,790 entries across 6,784 versions & 25 rubygems