yard_klippstein_template 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -3,6 +3,7 @@ Manifest.txt
3
3
  Rakefile.rb
4
4
  README.rdoc
5
5
  version.rb
6
+ templates/default/fulldoc/html/setup.rb
6
7
  templates/default/fulldoc/html/css/klippstein.css
7
8
  templates/default/fulldoc/html/js/klippstein.js
8
9
  templates/default/layout/html/setup.rb
@@ -0,0 +1,34 @@
1
+
2
+
3
+
4
+ # @return [String] HTML output of the classes to be displayed in the
5
+ # full_list_class template.
6
+ def class_list(root = Registry.root)
7
+ out = ""
8
+ children = run_verifier(root.children)
9
+ if root == Registry.root
10
+ children += @items.select {|o| o.namespace.is_a?(CodeObjects::Proxy) }
11
+ end
12
+ children.reject {|c| c.nil? }.sort_by {|child| child.path }.map do |child|
13
+
14
+ if child.is_a?(CodeObjects::NamespaceObject)
15
+ next if (child.is_a?(CodeObjects::ClassObject) && child.superclass.name.to_s == 'UnitTest') # Klippstein
16
+ name = child.namespace.is_a?(CodeObjects::Proxy) ? child.path : child.name
17
+ has_children = run_verifier(child.children).any? {|o| o.is_a?(CodeObjects::NamespaceObject) }
18
+ out << "<li>"
19
+ out << "<a class='toggle'></a> " if has_children
20
+ out << linkify(child, name)
21
+ out << " &lt; #{child.superclass.name}" if child.is_a?(CodeObjects::ClassObject) && child.superclass
22
+ out << "<small class='search_info'>"
23
+ if !child.namespace || child.namespace.root?
24
+ out << "Top Level Namespace"
25
+ else
26
+ out << child.namespace.path
27
+ end
28
+ out << "</small>"
29
+ out << "</li>"
30
+ out << "<ul>#{class_list(child)}</ul>" if has_children
31
+ end
32
+ end
33
+ out
34
+ end
data/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  module YardKlippsteinTemplate
3
3
 
4
- VERSION = '0.0.9'
4
+ VERSION = '0.0.10'
5
5
 
6
6
  end
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard_klippstein_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -74,6 +74,7 @@ files:
74
74
  - Rakefile.rb
75
75
  - README.rdoc
76
76
  - version.rb
77
+ - templates/default/fulldoc/html/setup.rb
77
78
  - templates/default/fulldoc/html/css/klippstein.css
78
79
  - templates/default/fulldoc/html/js/klippstein.js
79
80
  - templates/default/layout/html/setup.rb