Sha256: 4e15a5dac2e24e7c45169a7e33714054739088ebe0b121493693e57907992e04
Contents?: true
Size: 505 Bytes
Versions: 13
Compression:
Stored size: 505 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true module RuboCop module Cop # Common functionality for checking minimum body length. module MinBodyLength 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
13 entries across 13 versions & 2 rubygems