Check
TODO: Add summary
TODO: Add detail
ASSIGNMENTS = [:attrasgn, :attrset, :dasgn_curr, :iasgn, :lasgn, :masgn]
BRANCHES = [:if, :else, :while, :until, :for, :rescue, :case, :when, :and, :or]
CONDITIONS = [:and, :or]
# File lib/roodi/checks/abc_metric_method_check.rb, line 28 def evaluate_start(node) method_name = node[1] a = count_assignments(node) b = count_branches(node) c = count_conditionals(node) score = Math.sqrt(a*a + b*b + c*c) add_error "Method name \"#{method_name}\" has an ABC metric score of <#{a},#{b},#{c}> = #{score}. It should be #{@score} or less." unless score <= @score end
Generated with the Darkfish Rdoc Generator 2.