Class: SandiMeter::LOCChecker
- Inherits:
-
Struct
- Object
- Struct
- SandiMeter::LOCChecker
- Defined in:
- lib/sandi_meter/loc_checker.rb
Constant Summary collapse
- MAX_LOC =
{ 'def' => 5, 'class' => 100 }
Instance Attribute Summary collapse
-
#file_lines ⇒ Object
Returns the value of attribute file_lines.
Instance Method Summary collapse
Instance Attribute Details
#file_lines ⇒ Object
Returns the value of attribute file_lines
2 3 4 |
# File 'lib/sandi_meter/loc_checker.rb', line 2 def file_lines @file_lines end |
Instance Method Details
#check(params, token) ⇒ Object
9 10 11 12 |
# File 'lib/sandi_meter/loc_checker.rb', line 9 def check(params, token) _, first_line, last_line = params locs_size(first_line, last_line) <= MAX_LOC[token] end |