private Method

CodeStatistics.print_line(name, statistics)

There's no documentation for this item.

Source Code

# File code_statistics.rb, line 81
def print_line(name, statistics)
  m_over_c   = (statistics["methods"] / statistics["classes"])   rescue m_over_c = 0
  loc_over_m = (statistics["codelines"] / statistics["methods"]) - 2 rescue loc_over_m = 0

  start = if TEST_TYPES.include? name
    "| #{name.ljust(20)} "
  else
    "| #{name.ljust(20)} " 
  end

  puts start + 
       "| #{statistics["lines"].to_s.rjust(5)} " +
       "| #{statistics["codelines"].to_s.rjust(5)} " +
       "| #{statistics["classes"].to_s.rjust(7)} " +
       "| #{statistics["methods"].to_s.rjust(7)} " +
       "| #{m_over_c.to_s.rjust(3)} " +
       "| #{loc_over_m.to_s.rjust(5)} |"
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.