lib/sandwich/unit.rb
Assignment Branch Condition size for ml_to_imperial is too high. [<0, 15, 5> 15.81/15] Wontfix
Wontfix
def ml_to_imperial
if quantity >= 1000
Unit.new(quantity / 1000, :l).convert_to_imperial
elsif quantity > pint_in_ml
Unit.new((quantity / pint_in_ml), :pint)
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric and https://en.wikipedia.org/wiki/ABC_Software_Metric.