sqlpostgres 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. data/Gemfile +8 -0
  2. data/Gemfile.lock +22 -0
  3. data/LICENSE.md +23 -0
  4. data/README.rdoc +59 -0
  5. data/Rakefile +32 -0
  6. data/VERSION +1 -0
  7. data/doc/BUGS +2 -0
  8. data/doc/examples/README +6 -0
  9. data/doc/examples/connection.rb +16 -0
  10. data/doc/examples/connection_auto.rb +22 -0
  11. data/doc/examples/connection_ctor.rb +18 -0
  12. data/doc/examples/connection_default.rb +15 -0
  13. data/doc/examples/connection_exec.rb +18 -0
  14. data/doc/examples/connection_manual.rb +12 -0
  15. data/doc/examples/connection_wrapped_new.rb +13 -0
  16. data/doc/examples/connection_wrapped_open.rb +13 -0
  17. data/doc/examples/cursor.rb +38 -0
  18. data/doc/examples/include_module.rb +9 -0
  19. data/doc/examples/include_module2.rb +12 -0
  20. data/doc/examples/insert.rb +30 -0
  21. data/doc/examples/insert2.rb +36 -0
  22. data/doc/examples/insert_bytea.rb +16 -0
  23. data/doc/examples/insert_bytea_array.rb +17 -0
  24. data/doc/examples/insert_default_values.rb +16 -0
  25. data/doc/examples/insert_insert.rb +16 -0
  26. data/doc/examples/insert_insert_default.rb +16 -0
  27. data/doc/examples/insert_insert_select.rb +20 -0
  28. data/doc/examples/insert_select.rb +20 -0
  29. data/doc/examples/interval.rb +17 -0
  30. data/doc/examples/savepoint.rb +38 -0
  31. data/doc/examples/select.rb +33 -0
  32. data/doc/examples/select2.rb +36 -0
  33. data/doc/examples/select_cross_join.rb +18 -0
  34. data/doc/examples/select_distinct.rb +18 -0
  35. data/doc/examples/select_distinct_on +19 -0
  36. data/doc/examples/select_for_update.rb +18 -0
  37. data/doc/examples/select_from.rb +17 -0
  38. data/doc/examples/select_from_subselect.rb +20 -0
  39. data/doc/examples/select_group_by.rb +19 -0
  40. data/doc/examples/select_having.rb +20 -0
  41. data/doc/examples/select_join_on.rb +18 -0
  42. data/doc/examples/select_join_using.rb +18 -0
  43. data/doc/examples/select_limit.rb +19 -0
  44. data/doc/examples/select_natural_join.rb +18 -0
  45. data/doc/examples/select_offset.rb +19 -0
  46. data/doc/examples/select_order_by.rb +20 -0
  47. data/doc/examples/select_select.rb +30 -0
  48. data/doc/examples/select_select_alias.rb +30 -0
  49. data/doc/examples/select_select_expression.rb +31 -0
  50. data/doc/examples/select_select_literal.rb +24 -0
  51. data/doc/examples/select_union.rb +21 -0
  52. data/doc/examples/select_where_array.rb +18 -0
  53. data/doc/examples/select_where_in.rb +18 -0
  54. data/doc/examples/select_where_string.rb +18 -0
  55. data/doc/examples/simple.rb +34 -0
  56. data/doc/examples/transaction.rb +30 -0
  57. data/doc/examples/transaction_abort.rb +30 -0
  58. data/doc/examples/transaction_commit.rb +34 -0
  59. data/doc/examples/translate_substitute_values.rb +17 -0
  60. data/doc/examples/update.rb +32 -0
  61. data/doc/examples/update2.rb +44 -0
  62. data/doc/examples/update_only.rb +17 -0
  63. data/doc/examples/update_set.rb +17 -0
  64. data/doc/examples/update_set_array.rb +16 -0
  65. data/doc/examples/update_set_bytea.rb +16 -0
  66. data/doc/examples/update_set_expression.rb +16 -0
  67. data/doc/examples/update_set_subselect.rb +20 -0
  68. data/doc/examples/update_where.rb +17 -0
  69. data/doc/examples/use_prefix.rb +8 -0
  70. data/doc/examples/use_prefix2.rb +11 -0
  71. data/doc/index.html +31 -0
  72. data/doc/insertexamples.rb +9 -0
  73. data/doc/makemanual +4 -0
  74. data/doc/makerdoc +5 -0
  75. data/doc/manual.dbk +622 -0
  76. data/lib/sqlpostgres/Connection.rb +198 -0
  77. data/lib/sqlpostgres/Cursor.rb +157 -0
  78. data/lib/sqlpostgres/Delete.rb +67 -0
  79. data/lib/sqlpostgres/Exceptions.rb +15 -0
  80. data/lib/sqlpostgres/Insert.rb +279 -0
  81. data/lib/sqlpostgres/NullConnection.rb +22 -0
  82. data/lib/sqlpostgres/PgBit.rb +73 -0
  83. data/lib/sqlpostgres/PgBox.rb +37 -0
  84. data/lib/sqlpostgres/PgCidr.rb +21 -0
  85. data/lib/sqlpostgres/PgCircle.rb +75 -0
  86. data/lib/sqlpostgres/PgInet.rb +21 -0
  87. data/lib/sqlpostgres/PgInterval.rb +208 -0
  88. data/lib/sqlpostgres/PgLineSegment.rb +37 -0
  89. data/lib/sqlpostgres/PgMacAddr.rb +21 -0
  90. data/lib/sqlpostgres/PgPath.rb +64 -0
  91. data/lib/sqlpostgres/PgPoint.rb +65 -0
  92. data/lib/sqlpostgres/PgPolygon.rb +56 -0
  93. data/lib/sqlpostgres/PgTime.rb +77 -0
  94. data/lib/sqlpostgres/PgTimeWithTimeZone.rb +98 -0
  95. data/lib/sqlpostgres/PgTimestamp.rb +93 -0
  96. data/lib/sqlpostgres/PgTwoPoints.rb +54 -0
  97. data/lib/sqlpostgres/PgType.rb +34 -0
  98. data/lib/sqlpostgres/PgWrapper.rb +41 -0
  99. data/lib/sqlpostgres/Savepoint.rb +98 -0
  100. data/lib/sqlpostgres/Select.rb +855 -0
  101. data/lib/sqlpostgres/Transaction.rb +120 -0
  102. data/lib/sqlpostgres/Translate.rb +436 -0
  103. data/lib/sqlpostgres/Update.rb +188 -0
  104. data/lib/sqlpostgres.rb +67 -0
  105. data/test/Assert.rb +72 -0
  106. data/test/Connection.test.rb +246 -0
  107. data/test/Cursor.test.rb +190 -0
  108. data/test/Delete.test.rb +68 -0
  109. data/test/Insert.test.rb +123 -0
  110. data/test/MockPGconn.rb +62 -0
  111. data/test/NullConnection.test.rb +32 -0
  112. data/test/PgBit.test.rb +98 -0
  113. data/test/PgBox.test.rb +108 -0
  114. data/test/PgCidr.test.rb +61 -0
  115. data/test/PgCircle.test.rb +107 -0
  116. data/test/PgInet.test.rb +61 -0
  117. data/test/PgInterval.test.rb +180 -0
  118. data/test/PgLineSegment.test.rb +108 -0
  119. data/test/PgMacAddr.test.rb +61 -0
  120. data/test/PgPath.test.rb +106 -0
  121. data/test/PgPoint.test.rb +100 -0
  122. data/test/PgPolygon.test.rb +95 -0
  123. data/test/PgTime.test.rb +120 -0
  124. data/test/PgTimeWithTimeZone.test.rb +117 -0
  125. data/test/PgTimestamp.test.rb +134 -0
  126. data/test/RandomThings.rb +25 -0
  127. data/test/Savepoint.test.rb +286 -0
  128. data/test/Select.test.rb +930 -0
  129. data/test/Test.rb +62 -0
  130. data/test/TestConfig.rb +21 -0
  131. data/test/TestSetup.rb +13 -0
  132. data/test/TestUtil.rb +92 -0
  133. data/test/Transaction.test.rb +275 -0
  134. data/test/Translate.test.rb +354 -0
  135. data/test/Update.test.rb +227 -0
  136. data/test/roundtrip.test.rb +565 -0
  137. data/test/test +34 -0
  138. data/tools/exampleinserter/ExampleInserter.rb +177 -0
  139. data/tools/rdoc/ChangeLog +796 -0
  140. data/tools/rdoc/EXAMPLE.rb +48 -0
  141. data/tools/rdoc/MANIFEST +58 -0
  142. data/tools/rdoc/Makefile +27 -0
  143. data/tools/rdoc/NEW_FEATURES +226 -0
  144. data/tools/rdoc/README +390 -0
  145. data/tools/rdoc/ToDo +6 -0
  146. data/tools/rdoc/contrib/Index +6 -0
  147. data/tools/rdoc/contrib/xslfo/ChangeLog +181 -0
  148. data/tools/rdoc/contrib/xslfo/README +106 -0
  149. data/tools/rdoc/contrib/xslfo/TODO +10 -0
  150. data/tools/rdoc/contrib/xslfo/convert.xsl +151 -0
  151. data/tools/rdoc/contrib/xslfo/demo/README +21 -0
  152. data/tools/rdoc/contrib/xslfo/demo/rdocfo +99 -0
  153. data/tools/rdoc/contrib/xslfo/fcm.xsl +54 -0
  154. data/tools/rdoc/contrib/xslfo/files.xsl +62 -0
  155. data/tools/rdoc/contrib/xslfo/labeled-lists.xsl +66 -0
  156. data/tools/rdoc/contrib/xslfo/lists.xsl +44 -0
  157. data/tools/rdoc/contrib/xslfo/modules.xsl +152 -0
  158. data/tools/rdoc/contrib/xslfo/rdoc.xsl +75 -0
  159. data/tools/rdoc/contrib/xslfo/source.xsl +66 -0
  160. data/tools/rdoc/contrib/xslfo/styles.xsl +69 -0
  161. data/tools/rdoc/contrib/xslfo/tables.xsl +67 -0
  162. data/tools/rdoc/contrib/xslfo/utils.xsl +21 -0
  163. data/tools/rdoc/debian/changelog +33 -0
  164. data/tools/rdoc/debian/compat +1 -0
  165. data/tools/rdoc/debian/control +20 -0
  166. data/tools/rdoc/debian/copyright +10 -0
  167. data/tools/rdoc/debian/dirs +2 -0
  168. data/tools/rdoc/debian/docs +2 -0
  169. data/tools/rdoc/debian/rdoc.1 +252 -0
  170. data/tools/rdoc/debian/rdoc.manpages +1 -0
  171. data/tools/rdoc/debian/rdoc.pod +149 -0
  172. data/tools/rdoc/debian/rules +9 -0
  173. data/tools/rdoc/dot/dot.rb +255 -0
  174. data/tools/rdoc/etc/rdoc.dtd +203 -0
  175. data/tools/rdoc/install.rb +137 -0
  176. data/tools/rdoc/markup/install.rb +43 -0
  177. data/tools/rdoc/markup/sample/sample.rb +42 -0
  178. data/tools/rdoc/markup/simple_markup/fragments.rb +323 -0
  179. data/tools/rdoc/markup/simple_markup/inline.rb +348 -0
  180. data/tools/rdoc/markup/simple_markup/lines.rb +147 -0
  181. data/tools/rdoc/markup/simple_markup/preprocess.rb +68 -0
  182. data/tools/rdoc/markup/simple_markup/to_html.rb +281 -0
  183. data/tools/rdoc/markup/simple_markup.rb +474 -0
  184. data/tools/rdoc/markup/test/AllTests.rb +2 -0
  185. data/tools/rdoc/markup/test/TestInline.rb +151 -0
  186. data/tools/rdoc/markup/test/TestParse.rb +411 -0
  187. data/tools/rdoc/rdoc/code_objects.rb +536 -0
  188. data/tools/rdoc/rdoc/diagram.rb +331 -0
  189. data/tools/rdoc/rdoc/generators/chm_generator.rb +112 -0
  190. data/tools/rdoc/rdoc/generators/html_generator.rb +1268 -0
  191. data/tools/rdoc/rdoc/generators/template/chm/chm.rb +86 -0
  192. data/tools/rdoc/rdoc/generators/template/html/html.rb +705 -0
  193. data/tools/rdoc/rdoc/generators/template/html/kilmer.rb +377 -0
  194. data/tools/rdoc/rdoc/generators/template/xml/rdf.rb +110 -0
  195. data/tools/rdoc/rdoc/generators/template/xml/xml.rb +110 -0
  196. data/tools/rdoc/rdoc/generators/xml_generator.rb +130 -0
  197. data/tools/rdoc/rdoc/options.rb +451 -0
  198. data/tools/rdoc/rdoc/parsers/parse_c.rb +287 -0
  199. data/tools/rdoc/rdoc/parsers/parse_f95.rb +118 -0
  200. data/tools/rdoc/rdoc/parsers/parse_rb.rb +2311 -0
  201. data/tools/rdoc/rdoc/parsers/parse_simple.rb +37 -0
  202. data/tools/rdoc/rdoc/parsers/parserfactory.rb +75 -0
  203. data/tools/rdoc/rdoc/rdoc.rb +219 -0
  204. data/tools/rdoc/rdoc/template.rb +234 -0
  205. data/tools/rdoc/rdoc/tokenstream.rb +25 -0
  206. data/tools/rdoc/rdoc.rb +9 -0
  207. metadata +291 -0
@@ -0,0 +1,705 @@
1
+ module RDoc
2
+
3
+ # This is how you define the HTML that RDoc generates. Simply create
4
+ # a file in rdoc/generators/html_templates that creates the
5
+ # module RDoc::Page and populate it as described below. Then invoke
6
+ # rdoc using the --template <name of your file> option, and
7
+ # your template will be used.
8
+ #
9
+ # The constants defining pages use a simple templating system:
10
+ #
11
+ # * The templating system is passed a hash. Keys in the hash correspond
12
+ # to tags on this page. The tag %abc% is looked up in the hash,
13
+ # and is replaced by the corresponding hash value.
14
+ #
15
+ # * Some tags are optional. You can detect this using IF/ENDIF
16
+ #
17
+ # IF: title
18
+ # The value of title is %title%
19
+ # ENDIF: title
20
+ #
21
+ # * Some entries in the hash have values that are arrays, where each
22
+ # entry in the array is itself a hash. These are used to generate
23
+ # lists using the START: construct. For example, given a hash
24
+ # containing
25
+ #
26
+ # { 'people' => [ { 'name' => 'Fred', 'age' => '12' },
27
+ # { 'name' => 'Mary', 'age' => '21' } ]
28
+ #
29
+ # You could generate a simple table using
30
+ #
31
+ # <table>
32
+ # START:people
33
+ # <tr><td>%name%<td>%age</tr>
34
+ # END:people
35
+ # </table>
36
+ #
37
+ # These lists can be nested to an arbitrary depth
38
+ #
39
+ # * the construct HREF:url:name: generates <a href="%url%">%name%</a>
40
+ # if +url+ is defined in the hash, or %name% otherwise.
41
+ #
42
+ #
43
+ # Your file must contain the following constants
44
+ #
45
+ # [*FONTS*] a list of fonts to be used
46
+ # [*STYLE*] a CSS section (without the <style> or comments). This is
47
+ # used to generate a style.css file
48
+ #
49
+ # [*BODY*]
50
+ # The main body of all non-index RDoc pages. BODY will contain
51
+ # two !INCLUDE!s. The first is used to include a document-type
52
+ # specific header (FILE_PAGE or CLASS_PAGE). The second include
53
+ # is for the method list (METHOD_LIST). THe body is passed:
54
+ # %title%:: the page's title
55
+ # %style_url%:: the url of a style sheet for this page
56
+ # %diagram%:: the optional URL of a diagram for this page
57
+ # %description:: a (potentially multi-paragraph) string containing
58
+ # the description for th file/class/module.
59
+ #
60
+ # %requires%:: an optional list of %aref%/%name% pairs, one for
61
+ # each module required by this file.
62
+ #
63
+ # %methods%:: an optional list of %aref%/%name%, one for each
64
+ # method documented on this page. This is intended
65
+ # to be an index.
66
+ #
67
+ # %attributes:: An optional list. For each attribute it contains:
68
+ # %name%:: the attribute name
69
+ # %rw%:: r/o, w/o, or r/w
70
+ # %a_desc%:: description of the attribute
71
+ #
72
+ # %classlist%:: An optional strin containing an already-formatted
73
+ # list of classes and modules documented in this file
74
+ #
75
+ # For FILE_PAGE entries, the body will be passed
76
+ #
77
+ # %short_name:: The name of the file
78
+ # %full_path%:: The full path to the file
79
+ # %dtm_modified%:: The date/time the file was last changed
80
+ #
81
+ # For class and module pages, the body will be passed
82
+ #
83
+ # %classmod%:: The name of the class or module
84
+ # %files%:: A list. FOr each file this class is defined in, it contains:
85
+ # %full_path_url%:: an (optional) URL of the RDoc page
86
+ # for this file
87
+ # %full_path%:: the name of the file
88
+ # %par_url%:: The (optional) URL of the RDoc page documenting this
89
+ # class's parent class
90
+ # %parent%:: The name of this classes parent.
91
+ #
92
+ # For both files and classes, the body is passed the following information
93
+ # on includes and methods:
94
+ #
95
+ # %includes%:: Optional list of included modules. For each, it receives
96
+ # %aref%:: optional URL to RDoc page for the module
97
+ # %name%:: the name of the module
98
+ #
99
+ # %method_list%:: Optional list of methods of a particular class and category.
100
+ #
101
+ # Each method list entry contains:
102
+ #
103
+ # %type%:: public/private/protected
104
+ # %category%:: instance/class
105
+ # %methods%:: a list of method descriptions
106
+ #
107
+ # Each method description contains:
108
+ #
109
+ # %aref%:: a target aref, used when referencing this method
110
+ # description. You should code this as <a name="%aref%">
111
+ # %codeurl%:: the optional URL to the page containing this method's
112
+ # source code.
113
+ # %name%:: the method's name
114
+ # %params%:: the method's parameters
115
+ # %m_desc%:: the (potentially multi-paragraph) description of
116
+ # this method.
117
+ #
118
+ # [*CLASS_PAGE*]
119
+ # Header for pages documenting classes and modules. See
120
+ # BODY above for the available parameters.
121
+ #
122
+ # [*FILE_PAGE*]
123
+ # Header for pages documenting files. See
124
+ # BODY above for the available parameters.
125
+ #
126
+ # [*METHOD_LIST*]
127
+ # Controls the display of the listing of methods. See BODY for
128
+ # parameters.
129
+ #
130
+ # [*INDEX*]
131
+ # The top-level index page. For a browser-like environment
132
+ # define a frame set that includes the file, class, and
133
+ # method indices. Passed
134
+ # %title%:: title of page
135
+ # %initial_page% :: url of initial page to display
136
+ #
137
+ # [*CLASS_INDEX*]
138
+ # Individual files for the three indexes. Passed:
139
+ # %index_url%:: URL of main index page
140
+ # %entries%:: List of
141
+ # %name%:: name of an index entry
142
+ # %href%:: url of corresponding page
143
+ # [*METHOD_INDEX*]
144
+ # Same as CLASS_INDEX for methods
145
+ #
146
+ # [*FILE_INDEX*]
147
+ # Same as CLASS_INDEX for methods
148
+ #
149
+ # [*FR_INDEX_BODY*]
150
+ # A wrapper around CLASS_INDEX< METHOD_INDEX, and FILE_INDEX.
151
+ # If those index strings contain the complete HTML for the
152
+ # output, then FR_INDEX_BODY can simply be !INCLUDE!
153
+ #
154
+ # [*SRC_PAGE*]
155
+ # Page used to display source code. Passed %title% and %code%,
156
+ # the latter being a multi-line string of code.
157
+
158
+ module Page
159
+
160
+ FONTS = "Verdana, Arial, Helvetica, sans-serif"
161
+
162
+ STYLE = %{
163
+ body,td,p { font-family: %fonts%;
164
+ color: #000040;
165
+ }
166
+
167
+ .attr-rw { font-size: x-small; color: #444488 }
168
+
169
+ .title-row { background: #0000aa;
170
+ color: #eeeeff;
171
+ }
172
+
173
+ .big-title-font { color: white;
174
+ font-family: %fonts%;
175
+ font-size: large;
176
+ height: 50px}
177
+
178
+ .small-title-font { color: aqua;
179
+ font-family: %fonts%;
180
+ font-size: xx-small; }
181
+
182
+ .aqua { color: aqua }
183
+
184
+ .method-name, attr-name {
185
+ font-family: monospace; font-weight: bold;
186
+ }
187
+
188
+ .tablesubtitle, .tablesubsubtitle {
189
+ width: 100%;
190
+ margin-top: 1ex;
191
+ margin-bottom: .5ex;
192
+ padding: 5px 0px 5px 20px;
193
+ font-size: large;
194
+ color: aqua;
195
+ background: #3333cc;
196
+ }
197
+
198
+ .name-list {
199
+ font-family: monospace;
200
+ margin-left: 40px;
201
+ margin-bottom: 2ex;
202
+ line-height: 140%;
203
+ }
204
+
205
+ .description {
206
+ margin-left: 40px;
207
+ margin-top: -2ex;
208
+ margin-bottom: 2ex;
209
+ }
210
+
211
+ .description p {
212
+ line-height: 140%;
213
+ }
214
+
215
+ .aka {
216
+ margin-left: 40px;
217
+ margin-bottom: 2ex;
218
+ line-height: 100%;
219
+ font-size: small;
220
+ color: #808080;
221
+ }
222
+
223
+ .methodtitle {
224
+ font-size: medium;
225
+ text-decoration: none;
226
+ color: #0000AA;
227
+ background: white;
228
+ }
229
+
230
+ .paramsig {
231
+ font-size: small;
232
+ }
233
+
234
+ .srcbut { float: right }
235
+
236
+ pre { font-size: 1.2em; }
237
+ tt { font-size: 1.2em; }
238
+
239
+ pre.source {
240
+ border-style: groove;
241
+ background-color: #ddddff;
242
+ margin-left: 40px;
243
+ padding: 1em 0em 1em 2em;
244
+ }
245
+
246
+ .classlist {
247
+ margin-left: 40px;
248
+ margin-bottom: 2ex;
249
+ line-height: 140%;
250
+ }
251
+
252
+ li {
253
+ display: list-item;
254
+ margin-top: .6em;
255
+ }
256
+
257
+ .kw { color: #3333FF; font-weight: bold }
258
+ .cmt { color: green; font-style: italic }
259
+ .str { color: #662222; font-style: italic }
260
+ .re { color: #662222; }
261
+ }
262
+
263
+
264
+ ############################################################################
265
+
266
+
267
+ HEADER = %{
268
+ <?xml version="1.0" encoding="utf-8"?>
269
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
270
+ "DTD/xhtml1-strict.dtd">
271
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
272
+ <head>
273
+ <title>%title%</title>
274
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
275
+ <link rel=StyleSheet href="%style_url%" type="text/css" media="screen" />
276
+ <script type="text/javascript" language="JavaScript">
277
+ <!--
278
+ function popCode(url) {
279
+ window.open(url, "Code",
280
+ "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
281
+ }
282
+ //-->
283
+ </script>
284
+ </head>
285
+ }
286
+
287
+
288
+ ###################################################################
289
+
290
+ METHOD_LIST = %{
291
+ IF:includes
292
+ <table summary="Included modules" cellpadding="5" width="100%">
293
+ <tr><td class="tablesubtitle">Included modules</td></tr>
294
+ </table>
295
+ <div class="name-list">
296
+ START:includes
297
+ <span class="method-name">HREF:aref:name:</span>
298
+ END:includes
299
+ </div>
300
+ ENDIF:includes
301
+
302
+ IF:method_list
303
+ START:method_list
304
+ IF:methods
305
+ <table summary="Method list" cellpadding="5" width="100%">
306
+ <tr><td class="tablesubtitle">%type% %category% methods</td></tr>
307
+ </table>
308
+ START:methods
309
+ <table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
310
+ <tr><td class="methodtitle">
311
+ <a name="%aref%"></a>
312
+ IF:codeurl
313
+ <a href="%codeurl%" target="Code" class="methodtitle"
314
+ onClick="popCode('%codeurl%');return false;">
315
+ ENDIF:codeurl
316
+ <b>%name%</b>%params%
317
+ IF:codeurl
318
+ </a>
319
+ ENDIF:codeurl
320
+ </td></tr>
321
+ </table>
322
+ IF:m_desc
323
+ <div class="description">
324
+ %m_desc%
325
+ </div>
326
+ ENDIF:m_desc
327
+ IF:aka
328
+ <div class="aka">
329
+ This method is also aliased as
330
+ START:aka
331
+ <a href="%aref%">%name%</a>
332
+ END:aka
333
+ </div>
334
+ ENDIF:aka
335
+ IF:sourcecode
336
+ <pre class="source">
337
+ %sourcecode%
338
+ </pre>
339
+ ENDIF:sourcecode
340
+ END:methods
341
+ ENDIF:methods
342
+ END:method_list
343
+ ENDIF:method_list
344
+ }
345
+
346
+ ###################################################################
347
+
348
+ CONTEXT_CONTENT = %{
349
+ IF:diagram
350
+ <table summary="Diagram of classes and modules" width="100%">
351
+ <tr><td align="center">
352
+ %diagram%
353
+ </td></tr></table>
354
+ ENDIF:diagram
355
+
356
+
357
+ IF:description
358
+ <div class="description">%description%</div>
359
+ ENDIF:description
360
+
361
+ IF:requires
362
+ <table summary="Requires" cellpadding="5" width="100%">
363
+ <tr><td class="tablesubtitle">Required files</td></tr>
364
+ </table>
365
+ <div class="name-list">
366
+ START:requires
367
+ HREF:aref:name:&nbsp; &nbsp;
368
+ END:requires
369
+ </div>
370
+ ENDIF:requires
371
+
372
+ IF:methods
373
+ <table summary="Methods" cellpadding="5" width="100%">
374
+ <tr><td class="tablesubtitle">Methods</td></tr>
375
+ </table>
376
+ <div class="name-list">
377
+ START:methods
378
+ HREF:aref:name:&nbsp; &nbsp;
379
+ END:methods
380
+ </div>
381
+ ENDIF:methods
382
+
383
+ IF:aliases
384
+ <table summary="Aliases" cellpadding="5" width="100%">
385
+ <tr><td class="tablesubtitle">External Aliases</td></tr>
386
+ </table>
387
+ <div class="name-list">
388
+ START:aliases
389
+ %old_name% -> %new_name%<br />
390
+ END:aliases
391
+ </div>
392
+ ENDIF:aliases
393
+
394
+ IF:attributes
395
+ <table summary="Attributes" cellpadding="5" width="100%">
396
+ <tr><td class="tablesubtitle">Attributes</td></tr>
397
+ </table>
398
+ <table summary="Attribute details" cellspacing="5">
399
+ START:attributes
400
+ <tr valign="top">
401
+ <td class="attr-name">%name%</td>
402
+ <td align="center" class="attr-rw">&nbsp;[%rw%]&nbsp;</td>
403
+ <td>%a_desc%</td>
404
+ </tr>
405
+ END:attributes
406
+ </table>
407
+ ENDIF:attributes
408
+
409
+ IF:classlist
410
+ <table summary="List of classes" cellpadding="5" width="100%">
411
+ <tr><td class="tablesubtitle">Classes and Modules</td></tr>
412
+ </table>
413
+ <div class="classlist">
414
+ %classlist%
415
+ </div>
416
+ ENDIF:classlist
417
+ }
418
+
419
+ ###############################################################################
420
+
421
+ BODY = HEADER + %{
422
+ <body bgcolor="white">
423
+ !INCLUDE! <!-- banner header -->
424
+ } +
425
+ CONTEXT_CONTENT + METHOD_LIST +
426
+ %{
427
+ </body>
428
+ </html>
429
+ }
430
+
431
+
432
+ ###############################################################################
433
+
434
+ FILE_PAGE = <<_FILE_PAGE_
435
+ <table summary="Information on file" width="100%">
436
+ <tr class="title-row">
437
+ <td><table summary="layout" width="100%"><tr>
438
+ <td class="big-title-font" colspan="2">%short_name%</td>
439
+ <td align="right"><table summary="layout" cellspacing="0" cellpadding="2">
440
+ <tr>
441
+ <td class="small-title-font">Path:</td>
442
+ <td class="small-title-font">%full_path%</td>
443
+ </tr>
444
+ <tr>
445
+ <td class="small-title-font">Modified:</td>
446
+ <td class="small-title-font">%dtm_modified%</td>
447
+ </tr>
448
+ </table>
449
+ </td></tr></table></td>
450
+ </tr>
451
+ </table>
452
+ _FILE_PAGE_
453
+
454
+ ###################################################################
455
+
456
+ CLASS_PAGE = %{
457
+ <table summary="Information on class" width="100%" border="0" cellspacing="0">
458
+ <tr class="title-row">
459
+ <td class="big-title-font">
460
+ <sup><font color="aqua">%classmod%</font></sup> %full_name%
461
+ </td>
462
+ <td align="right">
463
+ <table summary="layout" cellspacing="0" cellpadding="2">
464
+ <tr valign="top">
465
+ <td class="small-title-font">In:</td>
466
+ <td class="small-title-font">
467
+ START:infiles
468
+ IF:full_path_url
469
+ <a href="%full_path_url%" class="aqua">
470
+ ENDIF:full_path_url
471
+ %full_path%
472
+ IF:full_path_url
473
+ </a>
474
+ ENDIF:full_path_url
475
+ <br />
476
+ END:infiles
477
+ </td>
478
+ </tr>
479
+ IF:parent
480
+ <tr>
481
+ <td class="small-title-font">Parent:</td>
482
+ <td class="small-title-font">
483
+ IF:par_url
484
+ <a href="%par_url%" class="aqua">
485
+ ENDIF:par_url
486
+ %parent%
487
+ IF:par_url
488
+ </a>
489
+ ENDIF:par_url
490
+ </td>
491
+ </tr>
492
+ ENDIF:parent
493
+ </table>
494
+ </td>
495
+ </tr>
496
+ </table>
497
+ }
498
+
499
+ =begin
500
+ =end
501
+
502
+ ########################## Source code ##########################
503
+
504
+ SRC_PAGE = %{
505
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
506
+ <html>
507
+ <head>
508
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
509
+ <title>%title%</title>
510
+ <link rel=StyleSheet href="%style_url%" type="text/css" media="screen" />
511
+ </head>
512
+ <body bgcolor="white">
513
+ <pre>%code%</pre>
514
+ </body>
515
+ </html>
516
+ }
517
+
518
+ ########################## Index ################################
519
+
520
+ FR_INDEX_BODY = %{
521
+ !INCLUDE!
522
+ }
523
+
524
+ FILE_INDEX = %{
525
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
526
+ <html>
527
+ <head>
528
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
529
+ <title>%list_title%</title>
530
+ <style type="text/css">
531
+ <!--
532
+ body {
533
+ background-color: #ddddff;
534
+ font-family: #{FONTS};
535
+ font-size: 11px;
536
+ font-style: normal;
537
+ line-height: 14px;
538
+ color: #000040;
539
+ }
540
+ div.banner {
541
+ background: #0000aa;
542
+ color: white;
543
+ padding: 1;
544
+ margin: 0;
545
+ font-size: 90%;
546
+ font-weight: bold;
547
+ line-height: 1.1;
548
+ text-align: center;
549
+ width: 100%;
550
+ }
551
+
552
+ A.xx { color: white; font-weight: bold; }
553
+ -->
554
+ </style>
555
+ <base target="docwin">
556
+ </head>
557
+ <body>
558
+ <div class="banner"><a href="%index_url%" class="xx">%list_title%</a></div>
559
+ START:entries
560
+ <a href="%href%">%name%</a><br />
561
+ END:entries
562
+ </body></html>
563
+ }
564
+
565
+ CLASS_INDEX = FILE_INDEX
566
+ METHOD_INDEX = FILE_INDEX
567
+
568
+ INDEX = %{
569
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
570
+ <html>
571
+ <head>
572
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
573
+ <title>%title%</title></head>
574
+
575
+ <frameset rows="20%, 80%">
576
+ <frameset cols="25%,35%,45%">
577
+ <frame src="fr_file_index.html" title="Files" name="Files">
578
+ <frame src="fr_class_index.html" name="Classes">
579
+ <frame src="fr_method_index.html" name="Methods">
580
+ </frameset>
581
+ <frame src="%initial_page%" name="docwin">
582
+ <noframes>
583
+ <body bgcolor="white">
584
+ Sorry, RDoc currently only generates HTML using frames.
585
+ </body>
586
+ </noframes>
587
+ </frameset>
588
+
589
+ </html>
590
+ }
591
+
592
+ ######################################################################
593
+ #
594
+ # The following is used for the -1 option
595
+ #
596
+
597
+ CONTENTS_XML = %{
598
+ IF:description
599
+ %description%
600
+ ENDIF:description
601
+
602
+ IF:requires
603
+ <h4>Requires:</h4>
604
+ <ul>
605
+ START:requires
606
+ IF:aref
607
+ <li><a href="%aref%">%name%</a></li>
608
+ ENDIF:aref
609
+ IFNOT:aref
610
+ <li>%name%</li>
611
+ ENDIF:aref
612
+ END:requires
613
+ </ul>
614
+ ENDIF:requires
615
+
616
+ IF:attributes
617
+ <h4>Attributes</h4>
618
+ <table>
619
+ START:attributes
620
+ <tr><td>%name%</td><td>%rw%</td><td>%a_desc%</td></tr>
621
+ END:attributes
622
+ </table>
623
+ ENDIF:attributes
624
+
625
+ IF:includes
626
+ <h4>Includes</h4>
627
+ <ul>
628
+ START:includes
629
+ IF:aref
630
+ <li><a href="%aref%">%name%</a></li>
631
+ ENDIF:aref
632
+ IFNOT:aref
633
+ <li>%name%</li>
634
+ ENDIF:aref
635
+ END:includes
636
+ </ul>
637
+ ENDIF:includes
638
+
639
+ IF:method_list
640
+ <h3>Methods</h3>
641
+ START:method_list
642
+ IF:methods
643
+ START:methods
644
+ <h4>%type% %category% method: <a name="%aref%">%name%%params%</a></h4>
645
+
646
+ IF:m_desc
647
+ %m_desc%
648
+ ENDIF:m_desc
649
+
650
+ IF:sourcecode
651
+ <blockquote><pre>
652
+ %sourcecode%
653
+ </pre></blockquote>
654
+ ENDIF:sourcecode
655
+ END:methods
656
+ ENDIF:methods
657
+ END:method_list
658
+ ENDIF:method_list
659
+ }
660
+
661
+ ########################################################################
662
+
663
+ ONE_PAGE = %{
664
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
665
+ <html>
666
+ <head>
667
+ <title>%title%</title>
668
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
669
+ </head>
670
+ <body>
671
+ START:files
672
+ <h2>File: %short_name%</h2>
673
+ <table>
674
+ <tr><td>Path:</td><td>%full_path%</td></tr>
675
+ <tr><td>Modified:</td><td>%dtm_modified%</td></tr>
676
+ </table>
677
+ } + CONTENTS_XML + %{
678
+ END:files
679
+
680
+ IF:classes
681
+ <h2>Classes</h2>
682
+ START:classes
683
+ IF:parent
684
+ <h3>%classmod% %full_name% &lt; HREF:par_url:parent:</h3>
685
+ ENDIF:parent
686
+ IFNOT:parent
687
+ <h3>%classmod% %full_name%</h3>
688
+ ENDIF:parent
689
+
690
+ IF:infiles
691
+ (in files
692
+ START:infiles
693
+ HREF:full_path_url:full_path:
694
+ END:infiles
695
+ )
696
+ ENDIF:infiles
697
+ } + CONTENTS_XML + %{
698
+ END:classes
699
+ ENDIF:classes
700
+ </body>
701
+ </html>
702
+ }
703
+
704
+ end
705
+ end