<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja-JP">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<%=h charset() %>">
  <meta http-equiv="Content-Language" content="ja-JP">
  <link rel="stylesheet" type="text/css" href="<%=h css_url() %>">
  <link rel="icon" type="image/png" href="<%=h favicon_url() %>">
  <title><%=h @entry.type %> <%=h @entry.name %></title>
  <link rel="search" type="application/opensearchdescription+xml" title="<%= _('Ruby %s Reference Manual', ruby_version()) %>" href="<%=h opensearchdescription_url() %>">
</head>
<body>

<p>
<%= manual_home_link() %>
&gt; <a href="<%= library_index_url() %>"><%= _('All Libraries') %></a>
&gt; <%= friendly_library_link(@entry.library.name) %>
&gt; <%=h _(@entry.type.to_s + ' %s', @entry.name) %>
</p>
<%= search_form() %>

<%
    headline_init
%>
<%= headline("#{@entry.type} #{@entry.name}" + @entry.ancestors[1..@alevel].map{|c| " + #{c.name}" }.join) %>
<p>
<%
    myself, *supers = @entry.ancestors
    n = 0
%>
<%= _('ancestors') %>: <%= escape_html(myself.name) %>
<%  supers.each do |c| %>
      <%= @conf[:tochm_mode] ? "&lt;" : a_href("?a=#{n}", "<")  %> <%= class_link(c.name) %>
      <% n += 1 %>
<%  end %>

<% unless @entry.extended.empty? %>
<br>extend: <%= @entry.extended.map {|c| class_link(c.name) }.join(', ') %>
<% end %>
</p>
<%
    headline_push
%>
<%= headline(_("Abstract")) %>
<%= compile_rd(@entry.source) %>

<%
    ents =  @entry.partitioned_entries(@alevel)
    [[_('Singleton Methods'),         ents.singleton_methods          ],
     [_('Instance Methods'),          ents.instance_methods           ],
     [_('Private Singleton Methods'), ents.private_singleton_methods  ],
     [_('Private Instance Methods'),  ents.private_instance_methods   ],
     [_('Module Functions'),          ents.module_functions           ],
     [_('Constants'),                 ents.constants                  ],
     [_('Special Variables'),         ents.special_variables          ]]\
    .each do |label, entries|
      unless entries.empty? %>
<%=     headline(label) %>
<table class="entries" class="methods">
<tr>
  <th><%= _('Signature') %></th>
  <th colspan="2"><%= _('Description') %></th>
</tr>
<%
        headline_push
        entries.each do |m|
          foreach_method_chunk(m.source) do |sigs, src| %>
<tr>
<td class="signature">
  <a href="<%=h method_url(m.spec_string) %>"><code>
  <%= sigs.map {|sig| h(sig.friendly_string) }.join("<br>") %>
  </code></a>
</td>
<%          if m.redefined? %>
<td class="description"><%= compile_rd(src) %></td>
<td class="library"><%= library_link(m.library.name) %></td>
<%          elsif @entry.name != m.klass.name %>
<td class="description"><%= compile_rd(src) %></td>
<td class="library"><%= class_link(m.klass.name) %></td>
<%          else %>
<td class="description" colspan="2"><%= compile_rd(src) %></td>
<%          end %>
</tr>
<%
          end
        end
        headline_pop
%>
</table>
<%
      end
    end
%>

<%  specs = @entry.inherited_method_specs.sort
    unless specs.empty?  %>
<%= headline(_('Inherited Methods')) %>
<p><code>
<%    specs.each do |s| %>
<%=     method_link(s.to_s, (s.type == '#' ? s.method : s.type + s.method)) %>
<%    end %>
</code></p>
<%  end %>

<%
    [[_('Added Methods'),          ents.added]]\
    .each do |label, entries|
      unless entries.empty?  %>
<%=     headline(label) %>
<table class="entries" class="methods">
<tr>
  <th><%= _('Signature') %></th>
  <th><%= _('Description') %></th>
  <th><%= _('Library') %></th>
</tr>
<%
        headline_push
        entries.each do |m|
          foreach_method_chunk(m.source) do |sigs, src| %>
<tr>
<td class="signature">
  <a href="<%=h method_url(m.spec_string) %>"><code>
  <%= sigs.map {|sig| h(sig.friendly_string) }.join("<br>") %>
  </code></a>
</td>
<td class="description"><%= compile_rd(src) %></td>
<td class="library"><%= library_link(m.library.name) %></td>
</tr>
<%
          end
        end
        headline_pop
%>
</table>
<%
      end
    end
    headline_pop
%>

</body>
</html>
