File: setup.rb

package info (click to toggle)
puppet-agent 8.10.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,392 kB
  • sloc: ruby: 286,820; sh: 492; xml: 116; makefile: 88; cs: 68
file content (37 lines) | stat: -rw-r--r-- 1,115 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
def init
  super
end

def format_method_detail_extras(object)
  result = ""
  if object
    if object.respond_to?(:visibility)
      if object.visibility != :public
        result << "<span class=\"note title #{object.visibility}\">#{object.visibility}</span>"
      end
    end
      if object.has_tag?(:abstract)
        result << '<span class="abstract note title">abstract</span>'
      end
      if object.has_tag?(:deprecated)
        result << '<span class="deprecated note title">deprecated</span>'
      end
    if object.respond_to?(:visibility)
      if object.has_tag?(:api) && object.tag(:api).text == 'private' && object.visibility != :private
        result << '<span class="private note title">private</span>'
      end
    else  
      if object.has_tag?(:api) && object.tag(:api).text == 'private'
        result << '<span class="private note title">private</span>'
      end
    end
    if object.has_tag?(:dsl)
      result << '<span class="note title readonly">DSL</span>'
    end
  end
  # separate the extras with one space
  if result != ""
    result = "&nbsp;" + result
  end
  result
end