Sha256: 46a7e2ec4a6d9310ed31738f73a727b265f3863dbabcc38d9f8d826bafaac9a7
Contents?: true
Size: 474 Bytes
Versions: 9
Compression:
Stored size: 474 Bytes
Contents
# encoding: utf-8 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 fail 'MinBodyLength needs to be a positive integer!' end end end end
Version data entries
9 entries across 9 versions & 1 rubygems