File: inherited_attributes.erb

package info (click to toggle)
ruby-enumerable-statistics 2.0.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,036 kB
  • sloc: ansic: 1,808; ruby: 679; makefile: 11; sh: 4
file content (14 lines) | stat: -rwxr-xr-x 634 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<% found_method = false %>
<% inherited_attr_list do |superclass, attribs| %>
  <% if attr_listing.size == 0 && !found_method %><h2>Instance Attribute Summary</h2><% end %>
  <% found_method = true %>
  <h3 class="inherited">Attributes <%= superclass.type == :class ? 'inherited' : 'included' %> from <%= linkify superclass %></h3>
  <p class="inherited"><%= attribs.map do |method|
      name = method.name(true).gsub(/=$/, '')
      if superclass.type == :module && object.instance_mixins.include?(superclass)
        name = "##{name}" unless name =~ /^#/
      end
      linkify(method, name)
    end.join(", ")
  %></p>
<% end %>