sausage-sandwich/ruby_sandwich

View on GitHub
lib/sandwich/unit.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for ml_to_imperial is too high. [<0, 15, 5> 15.81/15]
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)
Severity: Minor
Found in lib/sandwich/unit.rb by rubocop

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.

There are no issues that match your filters.

Category
Status