Sha256: f4f697faafb2147af0d6cbbe42ce7d392336650adefd76dcb347b45de263184c
Contents?: true
Size: 367 Bytes
Versions: 10
Compression:
Stored size: 367 Bytes
Contents
module SandiMeter class LOCChecker < Struct.new(:file_lines) MAX_LOC = { 'def' => 5, 'class' => 100 } def check(params, token) _, first_line, last_line = params locs_size(first_line, last_line) <= MAX_LOC[token] end private def locs_size(first_line, last_line) last_line - first_line - 1 end end end
Version data entries
10 entries across 10 versions & 1 rubygems