File: class.rhtml

package info (click to toggle)
ruby-sdoc 2.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 968 kB
  • sloc: javascript: 4,455; ruby: 629; makefile: 3
file content (57 lines) | stat: -rw-r--r-- 2,348 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="en">
<head>
    <title><%= h klass.full_name %></title>
    <meta charset="<%= @options.charset %>" />
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <%= include_template '_head.rhtml', {:rel_prefix => rel_prefix, :tree_keys => klass.full_name.split('::') } %>

    <meta property="og:title" value="<%= klass.full_name %>">

  <% unless (description = klass.description).empty? %>
    <% human_desc = truncate(strip_tags(description.gsub("\n", " ").strip)) %>
    <meta name="description" content="<%= human_desc %>">
    <meta property="og:description" content="<%= human_desc %>">
  <% end %>

    <meta name="keywords" content="<%= klass.full_name %> class, <%= klass.method_list.map(&:name).join(", ") %>">
</head>

<body>
    <a class="sr-only sr-only-focusable" href="#content" data-turbolinks="false">Skip to Content</a>
    <a class="sr-only sr-only-focusable" href="#search" data-turbolinks="false">Skip to Search</a>

    <%= include_template '_panel.rhtml' %>

    <div class="banner">
        <% if ENV['HORO_PROJECT_NAME'] %>
            <span><%= ERB::Util.html_escape(ENV['HORO_PROJECT_NAME']) %> <%= ERB::Util.html_escape(ENV['HORO_PROJECT_VERSION']) %></span><br />
        <% end %>
        <h2>
            <span class="type"><%= klass.module? ? 'Module' : 'Class' %></span>
            <%= h klass.full_name %>
            <% if klass.type == 'class' %>
                <span class="parent">&lt;
                    <% if String === klass.superclass %>
                    <%= klass.superclass %>
                    <% elsif !klass.superclass.nil? %>
                    <a href="<%= klass.aref_to klass.superclass.path %>"><%= h klass.superclass.full_name %></a>
                    <% end %>
                </span>
            <% end %>
        </h2>
        <ul class="files">
            <% klass.in_files.each do |file| %>
            <li><a href="<%= "#{rel_prefix}/#{h file.path}" %>"><%= h file.absolute_name %></a></li>
            <% end  %>
        </ul>
        <% if ENV['HORO_BADGE_VERSION'] %>
            <div id="version-badge"><%= ENV['HORO_BADGE_VERSION'] %></div>
        <% end %>
    </div>

    <main id="bodyContent">
        <%= include_template '_context.rhtml', {:context => klass, :rel_prefix => rel_prefix} %>
    </main>
  </body>
</html>