<!DOCTYPE html>
<html>
  <head>
    <meta charset='utf-8'>
    <title><%= @filename %></title>
    <link rel="stylesheet" href="css/coco.css" type="text/css" />
  </head>
  <body>
    <p class="menu">
      <a href="index.html">Index</a> <img src="img/coconut16.png" width="16" height="16" />
      <a href="https://github.com/lkdjiin/coco/wiki">Wiki</a> <img src="img/coconut16.png" width="16" height="16" />
      <a href="https://github.com/lkdjiin/coco">Source</a> <img src="img/coconut16.png" width="16" height="16" />
      <a href="http://lkdjiin.github.com/coco/">Web site</a>
    </p>
    <h2><%= @filename %></h2>
    <p class="date"><%= "#{Time.now}" %></p>
    
    <table class="source">
      
      <% @lines.each do |num, text, hit|%>
      <%   if hit.nil? %>
        <tr class="never">
      <%   elsif hit.zero? %>
        <tr class="miss">
      <%   elsif hit > 0 %>
        <tr class="hit" %>
      <%   end %>

      <%= "<td><pre>#{num} </pre></td><td><pre>#{text}</pre></td>" %>

        </tr>
      <% end%>
      
    </table>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <meta charset='utf-8'>
    <title><%= @filename %></title>
    <link rel="stylesheet" href="css/coco.css" type="text/css" />
  </head>
  <body>
    <p class="menu">
      <a href="index.html">Index</a> <img src="img/coconut16.png" width="16" height="16" />
      <a href="https://github.com/lkdjiin/coco/wiki">Wiki</a> <img src="img/coconut16.png" width="16" height="16" />
      <a href="https://github.com/lkdjiin/coco">Source</a> <img src="img/coconut16.png" width="16" height="16" />
      <a href="http://lkdjiin.github.com/coco/">Web site</a>
    </p>
    <h2><%= @filename %></h2>
    <p class="date"><%= "#{Time.now}" %></p>
    
    <table class="source">
      
      <% @lines.each do |num, text, hit|%>
        <% hit_class = case hit; when nil; 'never'; when 0; 'miss'; else; 'hit'; end %>

        <tr class="<%= hit_class %>">
      <%= "<td><pre>#{num} </pre></td><td><pre>#{text}</pre></td>" %>
        </tr>
      <% end%>
      
    </table>
  </body>
</html>

Simplify code for CSS class detection
Simplify code for CSS class detection
