/tools/Ruby/lib/ruby/1.8/rdoc/generators/template/html/one_page_html.rb

http://github.com/agross/netopenspace · Ruby · 122 lines · 105 code · 12 blank · 5 comment · 0 complexity · ba16bf8ba4be9ea1b7473718b0fdf633 MD5 · raw file

  1. module RDoc
  2. module Page
  3. ######################################################################
  4. #
  5. # The following is used for the -1 option
  6. #
  7. CONTENTS_XML = %{
  8. IF:description
  9. %description%
  10. ENDIF:description
  11. IF:requires
  12. <h4>Requires:</h4>
  13. <ul>
  14. START:requires
  15. IF:aref
  16. <li><a href="%aref%">%name%</a></li>
  17. ENDIF:aref
  18. IFNOT:aref
  19. <li>%name%</li>
  20. ENDIF:aref
  21. END:requires
  22. </ul>
  23. ENDIF:requires
  24. IF:attributes
  25. <h4>Attributes</h4>
  26. <table>
  27. START:attributes
  28. <tr><td>%name%</td><td>%rw%</td><td>%a_desc%</td></tr>
  29. END:attributes
  30. </table>
  31. ENDIF:attributes
  32. IF:includes
  33. <h4>Includes</h4>
  34. <ul>
  35. START:includes
  36. IF:aref
  37. <li><a href="%aref%">%name%</a></li>
  38. ENDIF:aref
  39. IFNOT:aref
  40. <li>%name%</li>
  41. ENDIF:aref
  42. END:includes
  43. </ul>
  44. ENDIF:includes
  45. IF:method_list
  46. <h3>Methods</h3>
  47. START:method_list
  48. IF:methods
  49. START:methods
  50. <h4>%type% %category% method:
  51. IF:callseq
  52. <a name="%aref%">%callseq%</a>
  53. ENDIF:callseq
  54. IFNOT:callseq
  55. <a name="%aref%">%name%%params%</a></h4>
  56. ENDIF:callseq
  57. IF:m_desc
  58. %m_desc%
  59. ENDIF:m_desc
  60. IF:sourcecode
  61. <blockquote><pre>
  62. %sourcecode%
  63. </pre></blockquote>
  64. ENDIF:sourcecode
  65. END:methods
  66. ENDIF:methods
  67. END:method_list
  68. ENDIF:method_list
  69. }
  70. ########################################################################
  71. ONE_PAGE = %{
  72. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  73. <html>
  74. <head>
  75. <title>%title%</title>
  76. <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
  77. </head>
  78. <body>
  79. START:files
  80. <h2>File: %short_name%</h2>
  81. <table>
  82. <tr><td>Path:</td><td>%full_path%</td></tr>
  83. <tr><td>Modified:</td><td>%dtm_modified%</td></tr>
  84. </table>
  85. } + CONTENTS_XML + %{
  86. END:files
  87. IF:classes
  88. <h2>Classes</h2>
  89. START:classes
  90. IF:parent
  91. <h3>%classmod% %full_name% &lt; HREF:par_url:parent:</h3>
  92. ENDIF:parent
  93. IFNOT:parent
  94. <h3>%classmod% %full_name%</h3>
  95. ENDIF:parent
  96. IF:infiles
  97. (in files
  98. START:infiles
  99. HREF:full_path_url:full_path:
  100. END:infiles
  101. )
  102. ENDIF:infiles
  103. } + CONTENTS_XML + %{
  104. END:classes
  105. ENDIF:classes
  106. </body>
  107. </html>
  108. }
  109. end
  110. end