<div class="section <%= generator_name %>">
  <h1>Attributes</h1>

  <% [:class, :instance].select {|s| object.attributes[s].length > 0 }.each do |scope| %>
    <div class="<%= scope %>">
      <h2><%= scope.capitalize %> Attributes</h2>
      <table>
      <% object.attributes[scope].sort_by {|o| o.to_s.downcase }.each do |name, rw| %>
        <tr>
          <th class="name"><%= h name %></td>
          <td class="readwrite">
            [<%= [:read, :write].reject {|t| !rw[t] }.map {|t| 
                rw[t].is_explicit? ? t[0,1].upcase : "<span id='#{anchor_for rw[t]}'>#{t[0,1].upcase}</span>"
              }.compact.join %>] 
          </td>
          <td class="visibility">
            <%= rw.values.compact.first.visibility %>
          </td>
          <td class="docstring">
            <%= htmlify rw.values.compact.first.docstring.summary %>
            <% if rw[:read] && rw[:read].tag(:return) && rw[:read].tag(:return).types %>
              <p class='returns'>
                Returns: 
                  <span class='return_types'>
                     <%= format_return_types rw[:read] %>
                  </span>
              </p>
            <% end %>
          </td>
        </tr>
      <% end %>
      </table>
    </div>
  <% end %>
</div>
<div class="section <%= generator_name %>">
  <h1>Attributes</h1>

  <% ['class', 'instance'].select {|s| object.attributes[s].length > 0 }.each do |scope| %>
    <div class="<%= scope %>">
      <h2><%= scope.capitalize %> Attributes</h2>
      <table>
      <% object.attributes[scope].sort_by {|o| o.to_s.downcase }.each do |name, rw| %>
        <tr>
          <th class="name"><%= h name %></td>
          <td class="readwrite">
            [<%= ['read', 'write'].reject {|t| !rw[t] }.map {|t| 
                rw[t].is_explicit? ? t[0,1].upcase : "<span id='#{anchor_for rw[t]}'>#{t[0,1].upcase}</span>"
              }.compact.join %>] 
          </td>
          <td class="visibility">
            <%= rw.values.compact.first.visibility %>
          </td>
          <td class="docstring">
            <%= htmlify rw.values.compact.first.docstring.summary %>
            <% if rw[:read] && rw[:read].tag(:return) && rw[:read].tag(:return).types %>
              <p class='returns'>
                Returns: 
                  <span class='return_types'>
                     <%= format_return_types rw[:read] %>
                  </span>
              </p>
            <% end %>
          </td>
        </tr>
      <% end %>
      </table>
    </div>
  <% end %>
</div>
Fix Ruby1.8 regression in attributes template (symbols cannot be capitalized)
Fix Ruby1.8 regression in attributes template (symbols cannot be capitalized)
