File: header.erb

package info (click to toggle)
yard 0.9.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 5,720 kB
  • sloc: ruby: 31,354; javascript: 7,608; makefile: 21
file content (18 lines) | stat: -rw-r--r-- 1,307 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<div class="method_header">
  <% if options.in_module %>
    <% if object.constructor? %>
      <em>self.</em><span class="path"><strong>new</strong></span><big>(</big><%= format_args(object) %><big>)</big> <%= format_block(object) %>
    <% else %>
      <em><%= object.scope == :class ? 'self.' : '' %></em><span class="path"><strong><%= object.is_attribute? ? object.name.to_s.sub(/=$/, '') : object.name %></strong></span><% if object.is_attribute? %>
        <% rw = object.attr_info %>
        <% if rw && rw[:read] && !rw[:write] %><span class="readonly">readonly</span>
        <% elsif rw && !rw[:read] && rw[:write] %><span class="writeonly">writeonly</span>
        <% end %>
        <% else %><big>(</big><%= format_args(object) %><big>)</big> <%= format_block(object) %><% end %>
    <% end %>
  <% else %>
    <em>def</em> <span class="path space"><%= options.including_object.relative_path(object.namespace) %><big><%= object.send(:sep) %></big><strong><%= object.name %></strong></span><big>(</big><%= format_args(object) %><big>)</big> <%= format_block(object) %>
  <% end %>
  <% if object.has_tag?(:since) && object.namespace.tag(:since) != object.tag(:since) %><span class="since">since <%= object.tag(:since).text %></span><% end %>
</div>
<div class="method_body"><%= yieldall %></div>