rdoc 5.1.0 → 6.3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rdoc might be problematic. Click here for more details.

Files changed (158) hide show
  1. checksums.yaml +5 -5
  2. data/CONTRIBUTING.rdoc +4 -4
  3. data/Gemfile +9 -0
  4. data/History.rdoc +4 -4
  5. data/README.rdoc +5 -6
  6. data/Rakefile +35 -67
  7. data/lib/rdoc/alias.rb +1 -1
  8. data/lib/rdoc/anon_class.rb +1 -1
  9. data/lib/rdoc/any_method.rb +59 -15
  10. data/lib/rdoc/attr.rb +1 -1
  11. data/lib/rdoc/class_module.rb +5 -3
  12. data/lib/rdoc/code_object.rb +2 -9
  13. data/lib/rdoc/code_objects.rb +1 -1
  14. data/lib/rdoc/comment.rb +32 -11
  15. data/lib/rdoc/constant.rb +3 -3
  16. data/lib/rdoc/context/section.rb +1 -14
  17. data/lib/rdoc/context.rb +63 -20
  18. data/lib/rdoc/cross_reference.rb +33 -15
  19. data/lib/rdoc/encoding.rb +58 -30
  20. data/lib/rdoc/erb_partial.rb +2 -2
  21. data/lib/rdoc/erbio.rb +8 -4
  22. data/lib/rdoc/extend.rb +1 -1
  23. data/lib/rdoc/generator/darkfish.rb +60 -29
  24. data/lib/rdoc/generator/json_index.rb +6 -3
  25. data/lib/rdoc/generator/markup.rb +3 -13
  26. data/lib/rdoc/generator/pot/message_extractor.rb +1 -1
  27. data/lib/rdoc/generator/pot/po.rb +3 -3
  28. data/lib/rdoc/generator/pot/po_entry.rb +11 -11
  29. data/lib/rdoc/generator/pot.rb +4 -4
  30. data/lib/rdoc/generator/ri.rb +1 -1
  31. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +2 -2
  32. data/lib/rdoc/generator/template/darkfish/_head.rhtml +9 -7
  33. data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +2 -2
  34. data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +2 -2
  35. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +7 -7
  36. data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +2 -2
  37. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +7 -7
  38. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +6 -6
  39. data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +5 -5
  40. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +5 -5
  41. data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +5 -5
  42. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +4 -4
  43. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +4 -4
  44. data/lib/rdoc/generator/template/darkfish/class.rhtml +45 -47
  45. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +55 -6
  46. data/lib/rdoc/generator/template/darkfish/index.rhtml +3 -4
  47. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +22 -99
  48. data/lib/rdoc/generator/template/darkfish/js/search.js +32 -31
  49. data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +15 -16
  50. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +16 -16
  51. data/lib/rdoc/generator/template/json_index/js/navigation.js +4 -41
  52. data/lib/rdoc/generator/template/json_index/js/searcher.js +6 -6
  53. data/lib/rdoc/generator.rb +1 -1
  54. data/lib/rdoc/ghost_method.rb +1 -1
  55. data/lib/rdoc/i18n/locale.rb +1 -1
  56. data/lib/rdoc/i18n/text.rb +5 -5
  57. data/lib/rdoc/i18n.rb +3 -3
  58. data/lib/rdoc/include.rb +1 -1
  59. data/lib/rdoc/known_classes.rb +1 -1
  60. data/lib/rdoc/markdown/entities.rb +1 -1
  61. data/lib/rdoc/markdown/literals.kpeg +1 -0
  62. data/lib/rdoc/markdown/literals.rb +19 -7
  63. data/lib/rdoc/markdown.kpeg +92 -44
  64. data/lib/rdoc/markdown.rb +1171 -610
  65. data/lib/rdoc/markup/attr_changer.rb +1 -1
  66. data/lib/rdoc/markup/attr_span.rb +9 -3
  67. data/lib/rdoc/markup/attribute_manager.rb +115 -50
  68. data/lib/rdoc/markup/attributes.rb +7 -7
  69. data/lib/rdoc/markup/blank_line.rb +1 -1
  70. data/lib/rdoc/markup/block_quote.rb +1 -1
  71. data/lib/rdoc/markup/document.rb +1 -1
  72. data/lib/rdoc/markup/formatter.rb +25 -24
  73. data/lib/rdoc/markup/hard_break.rb +1 -1
  74. data/lib/rdoc/markup/heading.rb +4 -4
  75. data/lib/rdoc/markup/include.rb +1 -1
  76. data/lib/rdoc/markup/indented_paragraph.rb +1 -1
  77. data/lib/rdoc/markup/list.rb +1 -1
  78. data/lib/rdoc/markup/list_item.rb +1 -1
  79. data/lib/rdoc/markup/paragraph.rb +1 -1
  80. data/lib/rdoc/markup/parser.rb +79 -47
  81. data/lib/rdoc/markup/pre_process.rb +11 -6
  82. data/lib/rdoc/markup/raw.rb +1 -1
  83. data/lib/rdoc/markup/regexp_handling.rb +41 -0
  84. data/lib/rdoc/markup/rule.rb +1 -1
  85. data/lib/rdoc/markup/to_ansi.rb +1 -1
  86. data/lib/rdoc/markup/to_bs.rb +4 -4
  87. data/lib/rdoc/markup/to_html.rb +68 -26
  88. data/lib/rdoc/markup/to_html_crossref.rb +41 -26
  89. data/lib/rdoc/markup/to_html_snippet.rb +10 -10
  90. data/lib/rdoc/markup/to_joined_paragraph.rb +7 -32
  91. data/lib/rdoc/markup/to_label.rb +10 -10
  92. data/lib/rdoc/markup/to_markdown.rb +9 -9
  93. data/lib/rdoc/markup/to_rdoc.rb +35 -7
  94. data/lib/rdoc/markup/to_table_of_contents.rb +2 -1
  95. data/lib/rdoc/markup/to_test.rb +1 -1
  96. data/lib/rdoc/markup/to_tt_only.rb +3 -3
  97. data/lib/rdoc/markup/verbatim.rb +1 -1
  98. data/lib/rdoc/markup.rb +14 -17
  99. data/lib/rdoc/meta_method.rb +1 -1
  100. data/lib/rdoc/method_attr.rb +2 -2
  101. data/lib/rdoc/mixin.rb +1 -1
  102. data/lib/rdoc/normal_class.rb +3 -3
  103. data/lib/rdoc/normal_module.rb +1 -1
  104. data/lib/rdoc/options.rb +79 -21
  105. data/lib/rdoc/parser/c.rb +147 -194
  106. data/lib/rdoc/parser/changelog.rb +150 -19
  107. data/lib/rdoc/parser/markdown.rb +1 -1
  108. data/lib/rdoc/parser/rd.rb +1 -1
  109. data/lib/rdoc/parser/ripper_state_lex.rb +590 -0
  110. data/lib/rdoc/parser/ruby.rb +632 -466
  111. data/lib/rdoc/parser/ruby_tools.rb +33 -34
  112. data/lib/rdoc/parser/simple.rb +3 -3
  113. data/lib/rdoc/parser/text.rb +1 -1
  114. data/lib/rdoc/parser.rb +9 -34
  115. data/lib/rdoc/rd/block_parser.rb +47 -46
  116. data/lib/rdoc/rd/block_parser.ry +2 -2
  117. data/lib/rdoc/rd/inline.rb +5 -5
  118. data/lib/rdoc/rd/inline_parser.rb +139 -138
  119. data/lib/rdoc/rd/inline_parser.ry +1 -1
  120. data/lib/rdoc/rd.rb +1 -1
  121. data/lib/rdoc/rdoc.rb +54 -41
  122. data/lib/rdoc/require.rb +1 -1
  123. data/lib/rdoc/ri/driver.rb +132 -42
  124. data/lib/rdoc/ri/formatter.rb +1 -1
  125. data/lib/rdoc/ri/paths.rb +4 -18
  126. data/lib/rdoc/ri/store.rb +1 -1
  127. data/lib/rdoc/ri/task.rb +2 -2
  128. data/lib/rdoc/ri.rb +1 -1
  129. data/lib/rdoc/rubygems_hook.rb +3 -3
  130. data/lib/rdoc/servlet.rb +21 -12
  131. data/lib/rdoc/single_class.rb +1 -1
  132. data/lib/rdoc/stats/normal.rb +24 -18
  133. data/lib/rdoc/stats/quiet.rb +1 -1
  134. data/lib/rdoc/stats/verbose.rb +1 -1
  135. data/lib/rdoc/stats.rb +1 -1
  136. data/lib/rdoc/store.rb +38 -27
  137. data/lib/rdoc/task.rb +2 -2
  138. data/lib/rdoc/text.rb +16 -21
  139. data/lib/rdoc/token_stream.rb +56 -33
  140. data/lib/rdoc/tom_doc.rb +17 -12
  141. data/lib/rdoc/top_level.rb +9 -3
  142. data/lib/rdoc/version.rb +8 -0
  143. data/lib/rdoc.rb +24 -10
  144. data/man/ri.1 +247 -0
  145. data/rdoc.gemspec +206 -15
  146. metadata +15 -64
  147. data/.document +0 -5
  148. data/.gitignore +0 -13
  149. data/.travis.yml +0 -24
  150. data/lib/gauntlet_rdoc.rb +0 -82
  151. data/lib/rdoc/generator/template/darkfish/js/jquery.js +0 -4
  152. data/lib/rdoc/markup/formatter_test_case.rb +0 -764
  153. data/lib/rdoc/markup/inline.rb +0 -2
  154. data/lib/rdoc/markup/special.rb +0 -41
  155. data/lib/rdoc/markup/text_formatter_test_case.rb +0 -115
  156. data/lib/rdoc/ruby_lex.rb +0 -1367
  157. data/lib/rdoc/ruby_token.rb +0 -461
  158. data/lib/rdoc/test_case.rb +0 -204
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  require 'json'
3
3
  begin
4
4
  require 'zlib'
@@ -147,12 +147,15 @@ class RDoc::Generator::JsonIndex
147
147
 
148
148
  JSON.dump data, io, 0
149
149
  end
150
+ unless ENV['SOURCE_DATE_EPOCH'].nil?
151
+ index_file.utime index_file.atime, Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime
152
+ end
150
153
 
151
154
  Dir.chdir @template_dir do
152
155
  Dir['**/*.js'].each do |source|
153
156
  dest = File.join out_dir, source
154
157
 
155
- FileUtils.install source, dest, :mode => 0644, :verbose => $DEBUG_RDOC
158
+ FileUtils.install source, dest, :mode => 0644, :preserve => true, :verbose => $DEBUG_RDOC
156
159
  end
157
160
  end
158
161
  end
@@ -161,7 +164,7 @@ class RDoc::Generator::JsonIndex
161
164
  # Compress the search_index.js file using gzip
162
165
 
163
166
  def generate_gzipped
164
- return unless defined?(Zlib)
167
+ return if @options.dry_run or not defined?(Zlib)
165
168
 
166
169
  debug_msg "Compressing generated JSON index"
167
170
  out_dir = @base_dir + @options.op_dir
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  ##
3
3
  # Handle common RDoc::Markup tasks for various CodeObjects
4
4
  #
@@ -65,16 +65,6 @@ end
65
65
 
66
66
  class RDoc::MethodAttr
67
67
 
68
- @add_line_numbers = false
69
-
70
- class << self
71
- ##
72
- # Allows controlling whether <tt>#markup_code</tt> adds line numbers to
73
- # the source code.
74
-
75
- attr_accessor :add_line_numbers
76
- end
77
-
78
68
  ##
79
69
  # Prepend +src+ with line numbers. Relies on the first line of a source
80
70
  # code listing having:
@@ -106,7 +96,7 @@ class RDoc::MethodAttr
106
96
  ##
107
97
  # Turns the method's token stream into HTML.
108
98
  #
109
- # Prepends line numbers if +add_line_numbers+ is true.
99
+ # Prepends line numbers if +options.line_numbers+ is true.
110
100
 
111
101
  def markup_code
112
102
  return '' unless @token_stream
@@ -126,7 +116,7 @@ class RDoc::MethodAttr
126
116
  end
127
117
  src.gsub!(/^#{' ' * indent}/, '') if indent > 0
128
118
 
129
- add_line_numbers(src) if RDoc::MethodAttr.add_line_numbers
119
+ add_line_numbers(src) if options.line_numbers
130
120
 
131
121
  src
132
122
  end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  ##
3
3
  # Extracts message from RDoc::Store
4
4
 
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  ##
3
3
  # Generates a PO format text
4
4
 
@@ -29,8 +29,8 @@ class RDoc::Generator::POT::PO
29
29
  def to_s
30
30
  po = ''
31
31
  sort_entries.each do |entry|
32
- po << "\n" unless po.empty?
33
- po << entry.to_s
32
+ po += "\n" unless po.empty?
33
+ po += entry.to_s
34
34
  end
35
35
  po
36
36
  end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  ##
3
3
  # A PO entry in PO
4
4
 
@@ -40,11 +40,11 @@ class RDoc::Generator::POT::POEntry
40
40
 
41
41
  def to_s
42
42
  entry = ''
43
- entry << format_translator_comment
44
- entry << format_extracted_comment
45
- entry << format_references
46
- entry << format_flags
47
- entry << <<-ENTRY
43
+ entry += format_translator_comment
44
+ entry += format_extracted_comment
45
+ entry += format_references
46
+ entry += format_flags
47
+ entry += <<-ENTRY
48
48
  msgid #{format_message(@msgid)}
49
49
  msgstr #{format_message(@msgstr)}
50
50
  ENTRY
@@ -75,9 +75,9 @@ msgstr #{format_message(@msgstr)}
75
75
 
76
76
  formatted_comment = ''
77
77
  comment.each_line do |line|
78
- formatted_comment << "#{mark} #{line}"
78
+ formatted_comment += "#{mark} #{line}"
79
79
  end
80
- formatted_comment << "\n" unless formatted_comment.end_with?("\n")
80
+ formatted_comment += "\n" unless formatted_comment.end_with?("\n")
81
81
  formatted_comment
82
82
  end
83
83
 
@@ -94,7 +94,7 @@ msgstr #{format_message(@msgstr)}
94
94
 
95
95
  formatted_references = ''
96
96
  @references.sort.each do |file, line|
97
- formatted_references << "\#: #{file}:#{line}\n"
97
+ formatted_references += "\#: #{file}:#{line}\n"
98
98
  end
99
99
  formatted_references
100
100
  end
@@ -111,8 +111,8 @@ msgstr #{format_message(@msgstr)}
111
111
 
112
112
  formatted_message = '""'
113
113
  message.each_line do |line|
114
- formatted_message << "\n"
115
- formatted_message << "\"#{escape(line)}\""
114
+ formatted_message += "\n"
115
+ formatted_message += "\"#{escape(line)}\""
116
116
  end
117
117
  formatted_message
118
118
  end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  ##
3
3
  # Generates a POT file.
4
4
  #
@@ -91,8 +91,8 @@ class RDoc::Generator::POT
91
91
  extractor.extract
92
92
  end
93
93
 
94
- autoload :MessageExtractor, 'rdoc/generator/pot/message_extractor'
95
- autoload :PO, 'rdoc/generator/pot/po'
96
- autoload :POEntry, 'rdoc/generator/pot/po_entry'
94
+ require_relative 'pot/message_extractor'
95
+ require_relative 'pot/po'
96
+ require_relative 'pot/po_entry'
97
97
 
98
98
  end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
  ##
3
3
  # Generates ri data files
4
4
 
@@ -1,5 +1,5 @@
1
1
  <footer id="validator-badges" role="contentinfo">
2
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
3
- <p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> <%= RDoc::VERSION %>.
2
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
3
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> <%= RDoc::VERSION %>.
4
4
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
5
5
  </footer>
@@ -7,14 +7,16 @@
7
7
  var index_rel_prefix = "<%= rel_prefix %>/";
8
8
  </script>
9
9
 
10
- <script src="<%= asset_rel_prefix %>/js/jquery.js"></script>
11
- <script src="<%= asset_rel_prefix %>/js/darkfish.js"></script>
10
+ <script src="<%= asset_rel_prefix %>/js/navigation.js" defer></script>
11
+ <script src="<%= asset_rel_prefix %>/js/search.js" defer></script>
12
+ <script src="<%= asset_rel_prefix %>/js/search_index.js" defer></script>
13
+ <script src="<%= asset_rel_prefix %>/js/searcher.js" defer></script>
14
+ <script src="<%= asset_rel_prefix %>/js/darkfish.js" defer></script>
12
15
 
13
16
  <link href="<%= asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
14
17
  <link href="<%= asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
15
- <% if @options.template_stylesheets.flatten.any? then %>
16
- <% @options.template_stylesheets.flatten.each do |stylesheet| %>
18
+ <%- if @options.template_stylesheets.flatten.any? then -%>
19
+ <%- @options.template_stylesheets.flatten.each do |stylesheet| -%>
17
20
  <link href="<%= asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
18
- <% end %>
19
- <% end %>
20
-
21
+ <%- end -%>
22
+ <%- end -%>
@@ -1,4 +1,4 @@
1
- <% if !svninfo.empty? then %>
1
+ <%- if !svninfo.empty? then %>
2
2
  <div id="file-svninfo-section" class="nav-section">
3
3
  <h3>VCS Info</h3>
4
4
 
@@ -16,4 +16,4 @@
16
16
  </dl>
17
17
  </div>
18
18
  </div>
19
- <% end %>
19
+ <%- end -%>
@@ -2,8 +2,8 @@
2
2
  <h3>Class and Module Index</h3>
3
3
 
4
4
  <ul class="link-list">
5
- <% @modsort.each do |index_klass| %>
5
+ <%- @modsort.each do |index_klass| -%>
6
6
  <li><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.full_name %></a>
7
- <% end %>
7
+ <%- end -%>
8
8
  </ul>
9
9
  </div>
@@ -1,15 +1,15 @@
1
- <% unless klass.extends.empty? then %>
1
+ <%- unless klass.extends.empty? then %>
2
2
  <div id="extends-section" class="nav-section">
3
3
  <h3>Extended With Modules</h3>
4
4
 
5
5
  <ul class="link-list">
6
- <% klass.each_extend do |ext| %>
7
- <% unless String === ext.module then %>
6
+ <%- klass.each_extend do |ext| -%>
7
+ <%- unless String === ext.module then -%>
8
8
  <li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
9
- <% else %>
9
+ <%- else -%>
10
10
  <li><span class="extend"><%= ext.name %></span>
11
- <% end %>
12
- <% end %>
11
+ <%- end -%>
12
+ <%- end -%>
13
13
  </ul>
14
14
  </div>
15
- <% end %>
15
+ <%- end -%>
@@ -2,8 +2,8 @@
2
2
  <h3>Defined In</h3>
3
3
 
4
4
  <ul>
5
- <% klass.in_files.each do |tl| %>
5
+ <%- klass.in_files.each do |tl| -%>
6
6
  <li><%= h tl.relative_name %>
7
- <% end %>
7
+ <%- end -%>
8
8
  </ul>
9
9
  </div>
@@ -1,15 +1,15 @@
1
- <% unless klass.includes.empty? then %>
1
+ <%- unless klass.includes.empty? then %>
2
2
  <div id="includes-section" class="nav-section">
3
3
  <h3>Included Modules</h3>
4
4
 
5
5
  <ul class="link-list">
6
- <% klass.each_include do |inc| %>
7
- <% unless String === inc.module then %>
6
+ <%- klass.each_include do |inc| -%>
7
+ <%- unless String === inc.module then -%>
8
8
  <li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a>
9
- <% else %>
9
+ <%- else -%>
10
10
  <li><span class="include"><%= inc.name %></span>
11
- <% end %>
12
- <% end %>
11
+ <%- end -%>
12
+ <%- end -%>
13
13
  </ul>
14
14
  </div>
15
- <% end %>
15
+ <%- end -%>
@@ -2,14 +2,14 @@
2
2
  <h3>Documentation</h3>
3
3
 
4
4
  <ul>
5
- <% installed.each do |name, href, exists, type, _| %>
6
- <% next if type == :extra %>
5
+ <%- installed.each do |name, href, exists, type, _| -%>
6
+ <%- next if type == :extra -%>
7
7
  <li class="folder">
8
- <% if exists then %>
8
+ <%- if exists then -%>
9
9
  <a href="<%= href %>"><%= h name %></a>
10
- <% else %>
10
+ <%- else -%>
11
11
  <%= h name %>
12
- <% end %>
13
- <% end %>
12
+ <%- end -%>
13
+ <%- end -%>
14
14
  </ul>
15
15
  </div>
@@ -1,12 +1,12 @@
1
- <% unless klass.method_list.empty? then %>
1
+ <%- unless klass.method_list.empty? then %>
2
2
  <!-- Method Quickref -->
3
3
  <div id="method-list-section" class="nav-section">
4
4
  <h3>Methods</h3>
5
5
 
6
6
  <ul class="link-list" role="directory">
7
- <% klass.each_method do |meth| %>
8
- <li <% if meth.calls_super %>class="calls-super" <% end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name %></a>
9
- <% end %>
7
+ <%- klass.each_method do |meth| -%>
8
+ <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name -%></a>
9
+ <%- end -%>
10
10
  </ul>
11
11
  </div>
12
- <% end %>
12
+ <%- end -%>
@@ -1,12 +1,12 @@
1
- <% simple_files = @files.select { |f| f.text? } %>
2
- <% unless simple_files.empty? then %>
1
+ <%- simple_files = @files.select { |f| f.text? } %>
2
+ <%- unless simple_files.empty? then -%>
3
3
  <div id="fileindex-section" class="nav-section">
4
4
  <h3>Pages</h3>
5
5
 
6
6
  <ul class="link-list">
7
- <% simple_files.each do |f| %>
7
+ <%- simple_files.each do |f| -%>
8
8
  <li><a href="<%= rel_prefix %>/<%= f.path %>"><%= h f.page_name %></a>
9
- <% end %>
9
+ <%- end -%>
10
10
  </ul>
11
11
  </div>
12
- <% end %>
12
+ <%- end -%>
@@ -1,11 +1,11 @@
1
- <% if klass.type == 'class' then %>
1
+ <%- if klass.type == 'class' then %>
2
2
  <div id="parent-class-section" class="nav-section">
3
3
  <h3>Parent</h3>
4
4
 
5
- <% if klass.superclass and not String === klass.superclass then %>
5
+ <%- if klass.superclass and not String === klass.superclass then -%>
6
6
  <p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a>
7
- <% else %>
7
+ <%- else -%>
8
8
  <p class="link"><%= klass.superclass %>
9
- <% end %>
9
+ <%- end -%>
10
10
  </div>
11
- <% end %>
11
+ <%- end -%>
@@ -1,11 +1,11 @@
1
- <% unless klass.sections.length == 1 then %>
1
+ <%- unless klass.sections.length == 1 then %>
2
2
  <div id="sections-section" class="nav-section">
3
3
  <h3>Sections</h3>
4
4
 
5
5
  <ul class="link-list" role="directory">
6
- <% klass.sort_sections.each do |section| %>
6
+ <%- klass.sort_sections.each do |section| -%>
7
7
  <li><a href="#<%= section.aref %>"><%= h section.title %></a></li>
8
- <% end %>
8
+ <%- end -%>
9
9
  </ul>
10
10
  </div>
11
- <% end %>
11
+ <%- end -%>
@@ -1,4 +1,4 @@
1
- <% comment = if current.respond_to? :comment_location then
1
+ <%- comment = if current.respond_to? :comment_location then
2
2
  current.comment_location
3
3
  else
4
4
  current.comment
@@ -10,9 +10,9 @@
10
10
  <h3>Table of Contents</h3>
11
11
 
12
12
  <ul class="link-list" role="directory">
13
- <% table.each do |heading| %>
13
+ <%- table.each do |heading| -%>
14
14
  <li><a href="#<%= heading.label current %>"><%= heading.plain_html %></a>
15
- <% end %>
15
+ <%- end -%>
16
16
  </ul>
17
17
  </div>
18
- <% end %>
18
+ <%- end -%>
@@ -25,11 +25,9 @@
25
25
  <%= klass.description %>
26
26
  </section>
27
27
 
28
- <% klass.each_section do |section, constants, attributes| %>
29
- <% constants = constants.select { |const| const.display? } %>
30
- <% attributes = attributes.select { |attr| attr.display? } %>
28
+ <%- klass.each_section do |section, constants, attributes| -%>
31
29
  <section id="<%= section.aref %>" class="documentation-section">
32
- <% if section.title then %>
30
+ <%- if section.title then -%>
33
31
  <header class="documentation-section-title">
34
32
  <h2>
35
33
  <%= section.title %>
@@ -38,39 +36,39 @@
38
36
  <a href="#top">&uarr; top</a>
39
37
  </span>
40
38
  </header>
41
- <% end %>
39
+ <%- end -%>
42
40
 
43
- <% if section.comment then %>
41
+ <%- if section.comment then -%>
44
42
  <div>
45
43
  <%= section.description %>
46
44
  </div>
47
- <% end %>
45
+ <%- end -%>
48
46
 
49
- <% unless constants.empty? then %>
47
+ <%- unless constants.empty? then -%>
50
48
  <section class="constants-list">
51
49
  <header>
52
50
  <h3>Constants</h3>
53
51
  </header>
54
52
  <dl>
55
- <% constants.each do |const| %>
53
+ <%- constants.each do |const| -%>
56
54
  <dt id="<%= const.name %>"><%= const.name %>
57
- <% if const.comment then %>
55
+ <%- if const.comment then -%>
58
56
  <dd><%= const.description.strip %>
59
- <% else %>
57
+ <%- else -%>
60
58
  <dd class="missing-docs">(Not documented)
61
- <% end %>
62
- <% end %>
59
+ <%- end -%>
60
+ <%- end -%>
63
61
  </dl>
64
62
  </section>
65
- <% end %>
63
+ <%- end -%>
66
64
 
67
- <% unless attributes.empty? then %>
65
+ <%- unless attributes.empty? then -%>
68
66
  <section class="attribute-method-details" class="method-section">
69
67
  <header>
70
68
  <h3>Attributes</h3>
71
69
  </header>
72
70
 
73
- <% attributes.each do |attrib| %>
71
+ <%- attributes.each do |attrib| -%>
74
72
  <div id="<%= attrib.aref %>" class="method-detail">
75
73
  <div class="method-heading attribute-method-heading">
76
74
  <span class="method-name"><%= h attrib.name %></span><span
@@ -78,18 +76,18 @@
78
76
  </div>
79
77
 
80
78
  <div class="method-description">
81
- <% if attrib.comment then %>
79
+ <%- if attrib.comment then -%>
82
80
  <%= attrib.description.strip %>
83
- <% else %>
81
+ <%- else -%>
84
82
  <p class="missing-docs">(Not documented)
85
- <% end %>
83
+ <%- end -%>
86
84
  </div>
87
85
  </div>
88
- <% end %>
86
+ <%- end -%>
89
87
  </section>
90
- <% end %>
88
+ <%- end -%>
91
89
 
92
- <% klass.methods_by_type(section).each do |type, visibilities|
90
+ <%- klass.methods_by_type(section).each do |type, visibilities|
93
91
  next if visibilities.empty?
94
92
  visibilities.each do |visibility, methods|
95
93
  next if methods.empty? %>
@@ -98,38 +96,38 @@
98
96
  <h3><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
99
97
  </header>
100
98
 
101
- <% methods.each do |method| %>
99
+ <%- methods.each do |method| -%>
102
100
  <div id="<%= method.aref %>" class="method-detail <%= method.is_alias_for ? "method-alias" : '' %>">
103
- <% if method.call_seq then %>
104
- <% method.call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
101
+ <%- if (call_seq = method.call_seq) then -%>
102
+ <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
105
103
  <div class="method-heading">
106
104
  <span class="method-callseq">
107
105
  <%= h(call_seq.strip.
108
106
  gsub( /^\w+\./m, '')).
109
107
  gsub(/(.*)[-=]&gt;/, '\1&rarr;') %>
110
108
  </span>
111
- <% if i == 0 and method.token_stream then %>
109
+ <%- if i == 0 and method.token_stream then -%>
112
110
  <span class="method-click-advice">click to toggle source</span>
113
- <% end %>
111
+ <%- end -%>
114
112
  </div>
115
- <% end %>
116
- <% else %>
113
+ <%- end -%>
114
+ <%- else -%>
117
115
  <div class="method-heading">
118
116
  <span class="method-name"><%= h method.name %></span><span
119
- class="method-args"><%= method.param_seq %></span>
120
- <% if method.token_stream then %>
117
+ class="method-args"><%= h method.param_seq %></span>
118
+ <%- if method.token_stream then -%>
121
119
  <span class="method-click-advice">click to toggle source</span>
122
- <% end %>
120
+ <%- end -%>
123
121
  </div>
124
- <% end %>
122
+ <%- end -%>
125
123
 
126
124
  <div class="method-description">
127
- <% if method.comment then %>
125
+ <%- if method.comment then -%>
128
126
  <%= method.description.strip %>
129
- <% else %>
127
+ <%- else -%>
130
128
  <p class="missing-docs">(Not documented)
131
- <% end %>
132
- <% if method.calls_super then %>
129
+ <%- end -%>
130
+ <%- if method.calls_super then -%>
133
131
  <div class="method-calls-super">
134
132
  Calls superclass method
135
133
  <%=
@@ -137,16 +135,16 @@
137
135
  method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
138
136
  %>
139
137
  </div>
140
- <% end %>
138
+ <%- end -%>
141
139
 
142
- <% if method.token_stream then %>
140
+ <%- if method.token_stream then -%>
143
141
  <div class="method-source-code" id="<%= method.html_name %>-source">
144
142
  <pre><%= method.markup_code %></pre>
145
143
  </div>
146
- <% end %>
144
+ <%- end -%>
147
145
  </div>
148
146
 
149
- <% unless method.aliases.empty? then %>
147
+ <%- unless method.aliases.empty? then -%>
150
148
  <div class="aliases">
151
149
  Also aliased as: <%= method.aliases.map do |aka|
152
150
  if aka.parent then # HACK lib/rexml/encodings
@@ -156,19 +154,19 @@
156
154
  end
157
155
  end.join ", " %>
158
156
  </div>
159
- <% end %>
157
+ <%- end -%>
160
158
 
161
- <% if method.is_alias_for then %>
159
+ <%- if method.is_alias_for then -%>
162
160
  <div class="aliases">
163
161
  Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
164
162
  </div>
165
- <% end %>
163
+ <%- end -%>
166
164
  </div>
167
165
 
168
- <% end %>
166
+ <%- end -%>
169
167
  </section>
170
- <% end
168
+ <%- end
171
169
  end %>
172
170
  </section>
173
- <% end %>
171
+ <%- end -%>
174
172
  </main>