vendor/jruby/1.9/gems/flog-4.2.1/lib/flog.rb
def score_method(tally)
    a, b, c = 0, 0, 0
    tally.each do |cat, score|
      case cat
      when :assignment then a += score
      when :branch     then b += score
      else                  c += score
      end
    end
    Math.sqrt(a*a + b*b + c*c)
  end
##
# Compute the distance formula for a given tally
Compute the distance formula for a given tally
Compute the distance formula for a given tally
def score_method(tally)
    a, b, c = 0, 0, 0
    tally.each do |cat, score|
      case cat
      when :assignment then a += score
      when :branch     then b += score
      else                  c += score
      end
    end
    Math.sqrt(a*a + b*b + c*c)
  end
def score_method ( tally ) a , b , c = 0 , 0 , 0 tally . each do | cat , score | case cat when :assignment then a += score when :branch then b += score else c += score end end Math . sqrt ( a * a + b * b + c * c ) end
Compute the distance formula for a given tally
Compute the distance formula for a given tally
tally