rio 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (395) hide show
  1. data/COPYING +340 -0
  2. data/ChangeLog +755 -0
  3. data/README +65 -0
  4. data/RUNME.1st.rb +75 -0
  5. data/Rakefile +312 -0
  6. data/VERSION +1 -0
  7. data/doc/README_MSWIN32.txt +39 -0
  8. data/doc/RELEASE_NOTES +130 -0
  9. data/doc/generators/template/html/rio.rb +895 -0
  10. data/doc/rdoc/classes/Kernel.html +181 -0
  11. data/doc/rdoc/classes/Kernel.src/M000183.html +18 -0
  12. data/doc/rdoc/classes/RIO.html +508 -0
  13. data/doc/rdoc/classes/RIO.src/M000001.html +18 -0
  14. data/doc/rdoc/classes/RIO.src/M000002.html +18 -0
  15. data/doc/rdoc/classes/RIO.src/M000003.html +18 -0
  16. data/doc/rdoc/classes/RIO/Doc.html +138 -0
  17. data/doc/rdoc/classes/RIO/Doc/HOWTO.html +1031 -0
  18. data/doc/rdoc/classes/RIO/Doc/INTRO.html +1116 -0
  19. data/doc/rdoc/classes/RIO/Doc/MISC.html +443 -0
  20. data/doc/rdoc/classes/RIO/Doc/SYNOPSIS.html +325 -0
  21. data/doc/rdoc/classes/RIO/Rio.html +6333 -0
  22. data/doc/rdoc/classes/RIO/Rio.src/M000004.html +18 -0
  23. data/doc/rdoc/classes/RIO/Rio.src/M000005.html +20 -0
  24. data/doc/rdoc/classes/RIO/Rio.src/M000006.html +27 -0
  25. data/doc/rdoc/classes/RIO/Rio.src/M000007.html +27 -0
  26. data/doc/rdoc/classes/RIO/Rio.src/M000008.html +16 -0
  27. data/doc/rdoc/classes/RIO/Rio.src/M000009.html +18 -0
  28. data/doc/rdoc/classes/RIO/Rio.src/M000010.html +20 -0
  29. data/doc/rdoc/classes/RIO/Rio.src/M000011.html +16 -0
  30. data/doc/rdoc/classes/RIO/Rio.src/M000012.html +16 -0
  31. data/doc/rdoc/classes/RIO/Rio.src/M000013.html +16 -0
  32. data/doc/rdoc/classes/RIO/Rio.src/M000014.html +16 -0
  33. data/doc/rdoc/classes/RIO/Rio.src/M000015.html +16 -0
  34. data/doc/rdoc/classes/RIO/Rio.src/M000016.html +16 -0
  35. data/doc/rdoc/classes/RIO/Rio.src/M000017.html +16 -0
  36. data/doc/rdoc/classes/RIO/Rio.src/M000018.html +16 -0
  37. data/doc/rdoc/classes/RIO/Rio.src/M000019.html +16 -0
  38. data/doc/rdoc/classes/RIO/Rio.src/M000020.html +16 -0
  39. data/doc/rdoc/classes/RIO/Rio.src/M000021.html +16 -0
  40. data/doc/rdoc/classes/RIO/Rio.src/M000022.html +16 -0
  41. data/doc/rdoc/classes/RIO/Rio.src/M000023.html +16 -0
  42. data/doc/rdoc/classes/RIO/Rio.src/M000024.html +16 -0
  43. data/doc/rdoc/classes/RIO/Rio.src/M000025.html +16 -0
  44. data/doc/rdoc/classes/RIO/Rio.src/M000026.html +16 -0
  45. data/doc/rdoc/classes/RIO/Rio.src/M000027.html +16 -0
  46. data/doc/rdoc/classes/RIO/Rio.src/M000028.html +16 -0
  47. data/doc/rdoc/classes/RIO/Rio.src/M000029.html +16 -0
  48. data/doc/rdoc/classes/RIO/Rio.src/M000030.html +16 -0
  49. data/doc/rdoc/classes/RIO/Rio.src/M000031.html +16 -0
  50. data/doc/rdoc/classes/RIO/Rio.src/M000032.html +16 -0
  51. data/doc/rdoc/classes/RIO/Rio.src/M000033.html +16 -0
  52. data/doc/rdoc/classes/RIO/Rio.src/M000034.html +16 -0
  53. data/doc/rdoc/classes/RIO/Rio.src/M000035.html +16 -0
  54. data/doc/rdoc/classes/RIO/Rio.src/M000036.html +16 -0
  55. data/doc/rdoc/classes/RIO/Rio.src/M000037.html +16 -0
  56. data/doc/rdoc/classes/RIO/Rio.src/M000038.html +16 -0
  57. data/doc/rdoc/classes/RIO/Rio.src/M000039.html +16 -0
  58. data/doc/rdoc/classes/RIO/Rio.src/M000040.html +16 -0
  59. data/doc/rdoc/classes/RIO/Rio.src/M000041.html +16 -0
  60. data/doc/rdoc/classes/RIO/Rio.src/M000042.html +16 -0
  61. data/doc/rdoc/classes/RIO/Rio.src/M000043.html +16 -0
  62. data/doc/rdoc/classes/RIO/Rio.src/M000044.html +16 -0
  63. data/doc/rdoc/classes/RIO/Rio.src/M000045.html +16 -0
  64. data/doc/rdoc/classes/RIO/Rio.src/M000046.html +16 -0
  65. data/doc/rdoc/classes/RIO/Rio.src/M000047.html +16 -0
  66. data/doc/rdoc/classes/RIO/Rio.src/M000048.html +16 -0
  67. data/doc/rdoc/classes/RIO/Rio.src/M000049.html +16 -0
  68. data/doc/rdoc/classes/RIO/Rio.src/M000050.html +16 -0
  69. data/doc/rdoc/classes/RIO/Rio.src/M000051.html +16 -0
  70. data/doc/rdoc/classes/RIO/Rio.src/M000052.html +16 -0
  71. data/doc/rdoc/classes/RIO/Rio.src/M000053.html +16 -0
  72. data/doc/rdoc/classes/RIO/Rio.src/M000054.html +16 -0
  73. data/doc/rdoc/classes/RIO/Rio.src/M000055.html +16 -0
  74. data/doc/rdoc/classes/RIO/Rio.src/M000056.html +16 -0
  75. data/doc/rdoc/classes/RIO/Rio.src/M000057.html +16 -0
  76. data/doc/rdoc/classes/RIO/Rio.src/M000058.html +16 -0
  77. data/doc/rdoc/classes/RIO/Rio.src/M000059.html +16 -0
  78. data/doc/rdoc/classes/RIO/Rio.src/M000060.html +16 -0
  79. data/doc/rdoc/classes/RIO/Rio.src/M000061.html +16 -0
  80. data/doc/rdoc/classes/RIO/Rio.src/M000062.html +16 -0
  81. data/doc/rdoc/classes/RIO/Rio.src/M000063.html +16 -0
  82. data/doc/rdoc/classes/RIO/Rio.src/M000064.html +16 -0
  83. data/doc/rdoc/classes/RIO/Rio.src/M000065.html +16 -0
  84. data/doc/rdoc/classes/RIO/Rio.src/M000066.html +16 -0
  85. data/doc/rdoc/classes/RIO/Rio.src/M000067.html +16 -0
  86. data/doc/rdoc/classes/RIO/Rio.src/M000068.html +16 -0
  87. data/doc/rdoc/classes/RIO/Rio.src/M000069.html +16 -0
  88. data/doc/rdoc/classes/RIO/Rio.src/M000070.html +16 -0
  89. data/doc/rdoc/classes/RIO/Rio.src/M000071.html +16 -0
  90. data/doc/rdoc/classes/RIO/Rio.src/M000072.html +16 -0
  91. data/doc/rdoc/classes/RIO/Rio.src/M000073.html +16 -0
  92. data/doc/rdoc/classes/RIO/Rio.src/M000074.html +16 -0
  93. data/doc/rdoc/classes/RIO/Rio.src/M000075.html +16 -0
  94. data/doc/rdoc/classes/RIO/Rio.src/M000076.html +16 -0
  95. data/doc/rdoc/classes/RIO/Rio.src/M000077.html +16 -0
  96. data/doc/rdoc/classes/RIO/Rio.src/M000078.html +16 -0
  97. data/doc/rdoc/classes/RIO/Rio.src/M000079.html +16 -0
  98. data/doc/rdoc/classes/RIO/Rio.src/M000080.html +16 -0
  99. data/doc/rdoc/classes/RIO/Rio.src/M000081.html +16 -0
  100. data/doc/rdoc/classes/RIO/Rio.src/M000082.html +16 -0
  101. data/doc/rdoc/classes/RIO/Rio.src/M000083.html +16 -0
  102. data/doc/rdoc/classes/RIO/Rio.src/M000084.html +16 -0
  103. data/doc/rdoc/classes/RIO/Rio.src/M000085.html +16 -0
  104. data/doc/rdoc/classes/RIO/Rio.src/M000086.html +16 -0
  105. data/doc/rdoc/classes/RIO/Rio.src/M000087.html +16 -0
  106. data/doc/rdoc/classes/RIO/Rio.src/M000088.html +16 -0
  107. data/doc/rdoc/classes/RIO/Rio.src/M000089.html +16 -0
  108. data/doc/rdoc/classes/RIO/Rio.src/M000090.html +16 -0
  109. data/doc/rdoc/classes/RIO/Rio.src/M000091.html +16 -0
  110. data/doc/rdoc/classes/RIO/Rio.src/M000092.html +16 -0
  111. data/doc/rdoc/classes/RIO/Rio.src/M000093.html +16 -0
  112. data/doc/rdoc/classes/RIO/Rio.src/M000094.html +16 -0
  113. data/doc/rdoc/classes/RIO/Rio.src/M000095.html +16 -0
  114. data/doc/rdoc/classes/RIO/Rio.src/M000096.html +16 -0
  115. data/doc/rdoc/classes/RIO/Rio.src/M000097.html +16 -0
  116. data/doc/rdoc/classes/RIO/Rio.src/M000098.html +16 -0
  117. data/doc/rdoc/classes/RIO/Rio.src/M000099.html +16 -0
  118. data/doc/rdoc/classes/RIO/Rio.src/M000100.html +16 -0
  119. data/doc/rdoc/classes/RIO/Rio.src/M000101.html +16 -0
  120. data/doc/rdoc/classes/RIO/Rio.src/M000102.html +16 -0
  121. data/doc/rdoc/classes/RIO/Rio.src/M000103.html +16 -0
  122. data/doc/rdoc/classes/RIO/Rio.src/M000104.html +16 -0
  123. data/doc/rdoc/classes/RIO/Rio.src/M000105.html +16 -0
  124. data/doc/rdoc/classes/RIO/Rio.src/M000106.html +16 -0
  125. data/doc/rdoc/classes/RIO/Rio.src/M000107.html +16 -0
  126. data/doc/rdoc/classes/RIO/Rio.src/M000108.html +16 -0
  127. data/doc/rdoc/classes/RIO/Rio.src/M000109.html +16 -0
  128. data/doc/rdoc/classes/RIO/Rio.src/M000110.html +16 -0
  129. data/doc/rdoc/classes/RIO/Rio.src/M000111.html +16 -0
  130. data/doc/rdoc/classes/RIO/Rio.src/M000112.html +16 -0
  131. data/doc/rdoc/classes/RIO/Rio.src/M000113.html +16 -0
  132. data/doc/rdoc/classes/RIO/Rio.src/M000114.html +16 -0
  133. data/doc/rdoc/classes/RIO/Rio.src/M000115.html +16 -0
  134. data/doc/rdoc/classes/RIO/Rio.src/M000116.html +16 -0
  135. data/doc/rdoc/classes/RIO/Rio.src/M000117.html +16 -0
  136. data/doc/rdoc/classes/RIO/Rio.src/M000118.html +16 -0
  137. data/doc/rdoc/classes/RIO/Rio.src/M000119.html +16 -0
  138. data/doc/rdoc/classes/RIO/Rio.src/M000120.html +16 -0
  139. data/doc/rdoc/classes/RIO/Rio.src/M000121.html +16 -0
  140. data/doc/rdoc/classes/RIO/Rio.src/M000122.html +16 -0
  141. data/doc/rdoc/classes/RIO/Rio.src/M000123.html +16 -0
  142. data/doc/rdoc/classes/RIO/Rio.src/M000124.html +16 -0
  143. data/doc/rdoc/classes/RIO/Rio.src/M000125.html +16 -0
  144. data/doc/rdoc/classes/RIO/Rio.src/M000126.html +16 -0
  145. data/doc/rdoc/classes/RIO/Rio.src/M000127.html +16 -0
  146. data/doc/rdoc/classes/RIO/Rio.src/M000128.html +16 -0
  147. data/doc/rdoc/classes/RIO/Rio.src/M000129.html +16 -0
  148. data/doc/rdoc/classes/RIO/Rio.src/M000130.html +16 -0
  149. data/doc/rdoc/classes/RIO/Rio.src/M000131.html +16 -0
  150. data/doc/rdoc/classes/RIO/Rio.src/M000132.html +16 -0
  151. data/doc/rdoc/classes/RIO/Rio.src/M000133.html +16 -0
  152. data/doc/rdoc/classes/RIO/Rio.src/M000134.html +16 -0
  153. data/doc/rdoc/classes/RIO/Rio.src/M000135.html +16 -0
  154. data/doc/rdoc/classes/RIO/Rio.src/M000136.html +16 -0
  155. data/doc/rdoc/classes/RIO/Rio.src/M000137.html +16 -0
  156. data/doc/rdoc/classes/RIO/Rio.src/M000138.html +16 -0
  157. data/doc/rdoc/classes/RIO/Rio.src/M000139.html +16 -0
  158. data/doc/rdoc/classes/RIO/Rio.src/M000140.html +16 -0
  159. data/doc/rdoc/classes/RIO/Rio.src/M000141.html +16 -0
  160. data/doc/rdoc/classes/RIO/Rio.src/M000142.html +16 -0
  161. data/doc/rdoc/classes/RIO/Rio.src/M000143.html +16 -0
  162. data/doc/rdoc/classes/RIO/Rio.src/M000144.html +16 -0
  163. data/doc/rdoc/classes/RIO/Rio.src/M000145.html +16 -0
  164. data/doc/rdoc/classes/RIO/Rio.src/M000146.html +16 -0
  165. data/doc/rdoc/classes/RIO/Rio.src/M000147.html +16 -0
  166. data/doc/rdoc/classes/RIO/Rio.src/M000148.html +16 -0
  167. data/doc/rdoc/classes/RIO/Rio.src/M000149.html +16 -0
  168. data/doc/rdoc/classes/RIO/Rio.src/M000150.html +16 -0
  169. data/doc/rdoc/classes/RIO/Rio.src/M000151.html +16 -0
  170. data/doc/rdoc/classes/RIO/Rio.src/M000152.html +16 -0
  171. data/doc/rdoc/classes/RIO/Rio.src/M000153.html +16 -0
  172. data/doc/rdoc/classes/RIO/Rio.src/M000154.html +16 -0
  173. data/doc/rdoc/classes/RIO/Rio.src/M000155.html +16 -0
  174. data/doc/rdoc/classes/RIO/Rio.src/M000156.html +16 -0
  175. data/doc/rdoc/classes/RIO/Rio.src/M000157.html +16 -0
  176. data/doc/rdoc/classes/RIO/Rio.src/M000158.html +16 -0
  177. data/doc/rdoc/classes/RIO/Rio.src/M000159.html +16 -0
  178. data/doc/rdoc/classes/RIO/Rio.src/M000160.html +16 -0
  179. data/doc/rdoc/classes/RIO/Rio.src/M000161.html +16 -0
  180. data/doc/rdoc/classes/RIO/Rio.src/M000162.html +16 -0
  181. data/doc/rdoc/classes/RIO/Rio.src/M000163.html +16 -0
  182. data/doc/rdoc/classes/RIO/Rio.src/M000164.html +16 -0
  183. data/doc/rdoc/classes/RIO/Rio.src/M000165.html +16 -0
  184. data/doc/rdoc/classes/RIO/Rio.src/M000166.html +16 -0
  185. data/doc/rdoc/classes/RIO/Rio.src/M000167.html +16 -0
  186. data/doc/rdoc/classes/RIO/Rio.src/M000168.html +16 -0
  187. data/doc/rdoc/classes/RIO/Rio.src/M000169.html +16 -0
  188. data/doc/rdoc/classes/RIO/Rio.src/M000170.html +16 -0
  189. data/doc/rdoc/classes/RIO/Rio.src/M000171.html +16 -0
  190. data/doc/rdoc/classes/RIO/Rio.src/M000172.html +16 -0
  191. data/doc/rdoc/classes/RIO/Rio.src/M000173.html +16 -0
  192. data/doc/rdoc/classes/RIO/Rio.src/M000174.html +16 -0
  193. data/doc/rdoc/classes/RIO/Rio.src/M000175.html +16 -0
  194. data/doc/rdoc/classes/RIO/Rio.src/M000176.html +16 -0
  195. data/doc/rdoc/classes/RIO/Rio.src/M000177.html +16 -0
  196. data/doc/rdoc/classes/RIO/Rio.src/M000178.html +16 -0
  197. data/doc/rdoc/classes/RIO/Rio.src/M000179.html +16 -0
  198. data/doc/rdoc/classes/RIO/Rio.src/M000180.html +16 -0
  199. data/doc/rdoc/classes/RIO/Rio.src/M000181.html +16 -0
  200. data/doc/rdoc/classes/RIO/Rio.src/M000182.html +16 -0
  201. data/doc/rdoc/created.rid +1 -0
  202. data/doc/rdoc/files/README.html +215 -0
  203. data/doc/rdoc/files/lib/rio/constructor_rb.html +142 -0
  204. data/doc/rdoc/files/lib/rio/doc/HOWTO_rb.html +135 -0
  205. data/doc/rdoc/files/lib/rio/doc/INTRO_rb.html +135 -0
  206. data/doc/rdoc/files/lib/rio/doc/MISC_rb.html +135 -0
  207. data/doc/rdoc/files/lib/rio/doc/SYNOPSIS_rb.html +135 -0
  208. data/doc/rdoc/files/lib/rio/if/basic_rb.html +135 -0
  209. data/doc/rdoc/files/lib/rio/if/dir_rb.html +135 -0
  210. data/doc/rdoc/files/lib/rio/if/file_rb.html +135 -0
  211. data/doc/rdoc/files/lib/rio/if/fileordir_rb.html +135 -0
  212. data/doc/rdoc/files/lib/rio/if/grande_rb.html +135 -0
  213. data/doc/rdoc/files/lib/rio/if/internal_rb.html +135 -0
  214. data/doc/rdoc/files/lib/rio/if/methods_rb.html +135 -0
  215. data/doc/rdoc/files/lib/rio/if/path_rb.html +135 -0
  216. data/doc/rdoc/files/lib/rio/if/stream_rb.html +135 -0
  217. data/doc/rdoc/files/lib/rio/if/test_rb.html +135 -0
  218. data/doc/rdoc/files/lib/rio/kernel_rb.html +142 -0
  219. data/doc/rdoc/files/lib/rio_rb.html +153 -0
  220. data/doc/rdoc/fr_class_index.html +34 -0
  221. data/doc/rdoc/fr_file_index.html +44 -0
  222. data/doc/rdoc/fr_method_index.html +210 -0
  223. data/doc/rdoc/index.html +24 -0
  224. data/doc/rdoc/rdoc-style.css +384 -0
  225. data/doc/rfc1738.txt +1403 -0
  226. data/doc/rfc959.txt +3933 -0
  227. data/ex/colx.rb +6 -0
  228. data/ex/findinruby +19 -0
  229. data/ex/findruby +11 -0
  230. data/ex/prompt.rb +25 -0
  231. data/ex/rgb.txt.gz +0 -0
  232. data/ex/riocat +35 -0
  233. data/ex/riogunzip +31 -0
  234. data/ex/riogzip +24 -0
  235. data/ex/tolf +11 -0
  236. data/lib/rio.rb +163 -0
  237. data/lib/rio/abstract_method.rb +57 -0
  238. data/lib/rio/argv.rb +57 -0
  239. data/lib/rio/arrayio.rb +199 -0
  240. data/lib/rio/arycopy.rb +44 -0
  241. data/lib/rio/assert.rb +115 -0
  242. data/lib/rio/base.rb +59 -0
  243. data/lib/rio/constructor.rb +183 -0
  244. data/lib/rio/context.rb +117 -0
  245. data/lib/rio/context/chomp.rb +53 -0
  246. data/lib/rio/context/closeoneof.rb +50 -0
  247. data/lib/rio/context/cxx.rb +67 -0
  248. data/lib/rio/context/dir.rb +92 -0
  249. data/lib/rio/context/gzip.rb +51 -0
  250. data/lib/rio/context/methods.rb +196 -0
  251. data/lib/rio/context/stream.rb +170 -0
  252. data/lib/rio/cp.rb +305 -0
  253. data/lib/rio/cxdir.rb +79 -0
  254. data/lib/rio/dir.rb +145 -0
  255. data/lib/rio/doc.rb +45 -0
  256. data/lib/rio/doc/HOWTO.rb +691 -0
  257. data/lib/rio/doc/INTRO.rb +579 -0
  258. data/lib/rio/doc/MISC.rb +257 -0
  259. data/lib/rio/doc/SYNOPSIS.rb +170 -0
  260. data/lib/rio/entrysel.rb +162 -0
  261. data/lib/rio/exception.rb +42 -0
  262. data/lib/rio/exception/copy.rb +98 -0
  263. data/lib/rio/exception/open.rb +62 -0
  264. data/lib/rio/exception/state.rb +74 -0
  265. data/lib/rio/ext.rb +62 -0
  266. data/lib/rio/ext/csv.rb +261 -0
  267. data/lib/rio/factory.rb +236 -0
  268. data/lib/rio/file.rb +77 -0
  269. data/lib/rio/filter/chomp.rb +61 -0
  270. data/lib/rio/filter/closeoneof.rb +103 -0
  271. data/lib/rio/filter/gzip.rb +58 -0
  272. data/lib/rio/ftp.rb +275 -0
  273. data/lib/rio/ftp/conn.rb +167 -0
  274. data/lib/rio/ftp/ioh.rb +88 -0
  275. data/lib/rio/grande.rb +126 -0
  276. data/lib/rio/handle.rb +101 -0
  277. data/lib/rio/if.rb +53 -0
  278. data/lib/rio/if/basic.rb +64 -0
  279. data/lib/rio/if/dir.rb +362 -0
  280. data/lib/rio/if/file.rb +57 -0
  281. data/lib/rio/if/fileordir.rb +247 -0
  282. data/lib/rio/if/grande.rb +510 -0
  283. data/lib/rio/if/internal.rb +53 -0
  284. data/lib/rio/if/methods.rb +612 -0
  285. data/lib/rio/if/path.rb +413 -0
  286. data/lib/rio/if/stream.rb +599 -0
  287. data/lib/rio/if/test.rb +219 -0
  288. data/lib/rio/impl/path.rb +82 -0
  289. data/lib/rio/ioh.rb +137 -0
  290. data/lib/rio/iomode.rb +96 -0
  291. data/lib/rio/kernel.rb +47 -0
  292. data/lib/rio/local.rb +63 -0
  293. data/lib/rio/match.rb +51 -0
  294. data/lib/rio/matchrecord.rb +254 -0
  295. data/lib/rio/open3.rb +69 -0
  296. data/lib/rio/ops/create.rb +78 -0
  297. data/lib/rio/ops/dir.rb +302 -0
  298. data/lib/rio/ops/either.rb +117 -0
  299. data/lib/rio/ops/file.rb +94 -0
  300. data/lib/rio/ops/path.rb +292 -0
  301. data/lib/rio/ops/stream.rb +84 -0
  302. data/lib/rio/ops/stream/input.rb +237 -0
  303. data/lib/rio/ops/stream/output.rb +96 -0
  304. data/lib/rio/ops/stream/read.rb +84 -0
  305. data/lib/rio/ops/stream/write.rb +58 -0
  306. data/lib/rio/ops/symlink.rb +70 -0
  307. data/lib/rio/path.rb +117 -0
  308. data/lib/rio/path/reset.rb +70 -0
  309. data/lib/rio/record.rb +59 -0
  310. data/lib/rio/rectype.rb +86 -0
  311. data/lib/rio/rl/base.rb +147 -0
  312. data/lib/rio/rl/builder.rb +166 -0
  313. data/lib/rio/rl/ioi.rb +66 -0
  314. data/lib/rio/rl/path.rb +141 -0
  315. data/lib/rio/rl/uri.rb +118 -0
  316. data/lib/rio/scheme/aryio.rb +89 -0
  317. data/lib/rio/scheme/cmdio.rb +74 -0
  318. data/lib/rio/scheme/fd.rb +65 -0
  319. data/lib/rio/scheme/ftp.rb +73 -0
  320. data/lib/rio/scheme/http.rb +81 -0
  321. data/lib/rio/scheme/path.rb +100 -0
  322. data/lib/rio/scheme/stderr.rb +56 -0
  323. data/lib/rio/scheme/stdio.rb +71 -0
  324. data/lib/rio/scheme/strio.rb +82 -0
  325. data/lib/rio/scheme/sysio.rb +61 -0
  326. data/lib/rio/scheme/tcp.rb +74 -0
  327. data/lib/rio/scheme/tempfile.rb +104 -0
  328. data/lib/rio/state.rb +209 -0
  329. data/lib/rio/state/error.rb +73 -0
  330. data/lib/rio/stream.rb +181 -0
  331. data/lib/rio/stream/base.rb +50 -0
  332. data/lib/rio/stream/duplex.rb +76 -0
  333. data/lib/rio/stream/open.rb +203 -0
  334. data/lib/rio/symantics.rb +46 -0
  335. data/lib/rio/to_rio.rb +57 -0
  336. data/lib/rio/uri/file.rb +145 -0
  337. data/lib/rio/version.rb +52 -0
  338. data/setup.rb +1331 -0
  339. data/test/1.rb +14 -0
  340. data/test/mswin32.rb +28 -0
  341. data/test/once.rb +7 -0
  342. data/test/runtests.rb +12 -0
  343. data/test/runtests_gem.rb +15 -0
  344. data/test/tc/abs.rb +349 -0
  345. data/test/tc/all.rb +42 -0
  346. data/test/tc/cd1.rb +116 -0
  347. data/test/tc/clearsel.rb +69 -0
  348. data/test/tc/closeoncopy.rb +91 -0
  349. data/test/tc/closeoneof.rb +194 -0
  350. data/test/tc/copy-from.rb +183 -0
  351. data/test/tc/copy-to.rb +94 -0
  352. data/test/tc/copy.rb +72 -0
  353. data/test/tc/copyarray.rb +191 -0
  354. data/test/tc/copydest.rb +50 -0
  355. data/test/tc/copydir.rb +192 -0
  356. data/test/tc/copydirlines.rb +124 -0
  357. data/test/tc/copylines.rb +40 -0
  358. data/test/tc/copynonex.rb +121 -0
  359. data/test/tc/create.rb +104 -0
  360. data/test/tc/csv.rb +229 -0
  361. data/test/tc/dir.rb +79 -0
  362. data/test/tc/dirautoclose.rb +70 -0
  363. data/test/tc/dirent.rb +180 -0
  364. data/test/tc/dirss.rb +84 -0
  365. data/test/tc/each.rb +111 -0
  366. data/test/tc/each_break.rb +241 -0
  367. data/test/tc/edf.rb +82 -0
  368. data/test/tc/entary.rb +230 -0
  369. data/test/tc/eq.rb +101 -0
  370. data/test/tc/expand_path.rb +94 -0
  371. data/test/tc/ext.rb +115 -0
  372. data/test/tc/fileno.rb +95 -0
  373. data/test/tc/getrec.rb +140 -0
  374. data/test/tc/lineno.rb +197 -0
  375. data/test/tc/lines.rb +66 -0
  376. data/test/tc/methods.rb +185 -0
  377. data/test/tc/misc.rb +473 -0
  378. data/test/tc/nolines.rb +205 -0
  379. data/test/tc/noqae.rb +873 -0
  380. data/test/tc/once.rb +6 -0
  381. data/test/tc/overload.rb +137 -0
  382. data/test/tc/pa.rb +159 -0
  383. data/test/tc/pathop.rb +63 -0
  384. data/test/tc/paths.rb +147 -0
  385. data/test/tc/qae.rb +494 -0
  386. data/test/tc/qae_riovar.rb +500 -0
  387. data/test/tc/records.rb +69 -0
  388. data/test/tc/rename.rb +224 -0
  389. data/test/tc/rename_assign.rb +48 -0
  390. data/test/tc/sub.rb +49 -0
  391. data/test/tc/symlink.rb +177 -0
  392. data/test/tc/symlink0.rb +298 -0
  393. data/test/tc/symlink1.rb +115 -0
  394. data/test/tc/testcase.rb +152 -0
  395. metadata +461 -0
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.3.1
@@ -0,0 +1,39 @@
1
+ Copyright (c) 2005, Christopher Kleckner
2
+ All rights reserved
3
+
4
+ This file is part of the Rio library for ruby.
5
+
6
+ Rio is free software; you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation; either version 2 of the License, or
9
+ (at your option) any later version.
10
+
11
+ Rio is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with Rio; if not, write to the Free Software
18
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
+
20
+
21
+ <b>Rio is pre-alpha software.
22
+ The documented interface and behavior is subject to change without notice.</b>
23
+
24
+ Currently support for MSWin paths involves simply ignoring the drive portion (C: etc)
25
+ of paths returned by by the underlying ruby libraries (that's right, it just
26
+ lopps that sob right off) While this is clearly unacceptable behavior, it is unclear
27
+ to the author whether support for paths that can not be represented per RFC1738 is
28
+ a feature of interest to anyone.
29
+
30
+ There is a relatively small amount of code that would have to change to add this
31
+ support in the future, and such support may be included in a future release.
32
+
33
+ For the time being, the subset of tests in 'test/mswin32.rb' do pass when running
34
+ under the mswin32 port of ruby. By far the majority of the tests that are excluded
35
+ are excluded because they use symlinks, not because of the differences in path
36
+ representations.
37
+
38
+
39
+
@@ -0,0 +1,130 @@
1
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2
+ Rio is pre-alpha software.
3
+ The documented interface and behavior is subject to change without notice.
4
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
+
6
+ === Rio - Ruby I/O Comfort Class
7
+
8
+ Rio is a convenience class wrapping much of the functionality of
9
+ IO, File, Dir, Pathname, FileUtils, Tempfile, StringIO, OpenURI, Zlib, and CSV.
10
+
11
+ To create the documentation for Rio run the command
12
+ rake rdoc
13
+ from the distribution directory.
14
+
15
+ If your don't have rake installed, install it, until you do try:
16
+ ruby RUNME.1st.rb
17
+ from the distribution directory.
18
+
19
+ Then point your browser at the 'doc/rdoc' directory.
20
+
21
+ Suggested Reading
22
+ * RIO::Doc::SYNOPSIS
23
+ * RIO::Doc::INTRO
24
+ * RIO::Doc::HOWTO
25
+ * RIO::Rio
26
+
27
+ == SYNOPSIS
28
+
29
+ For the following assume:
30
+ astring = ""
31
+ anarray = []
32
+
33
+ Copy a file into a string
34
+ rio('afile') > astring
35
+
36
+ Copy the chomped lines of a file into an array
37
+ rio('afile').chomp > anarray
38
+
39
+ Copy a file into another file
40
+ rio('afile') > rio('another_file')
41
+
42
+ Copy a file into a directory
43
+ rio('afile') > rio('adir')
44
+
45
+ Copy an entire directory structure into another directory
46
+ rio('adir') > rio('another_directory')
47
+
48
+ Copy a web page into a file
49
+ rio('http://rubydoc.org/') > rio('afile')
50
+
51
+ Copy a file from a ftp server into a file
52
+ rio('ftp://host/afile.gz') > rio('afile.gz')
53
+
54
+ Copy a gzipped file un-gzipping it
55
+ rio('afile.gz').gzip > rio('afile')
56
+
57
+ Copy a file from a ftp server into a local file un-gzipping it
58
+ rio('ftp://host/afile.gz').gzip > rio('afile')
59
+
60
+ Copy a plain file, gzipping it
61
+ rio('afile.gz').gzip < rio('afile')
62
+
63
+ Iterate over the entries in a directory
64
+ rio('adir').entries { |entrio| ... }
65
+
66
+ Iterate over only the files in a directory
67
+ rio('adir').files { |entrio| ... }
68
+
69
+ Iterate over only the .rb files in a directory
70
+ rio('adir').files('*.rb') { |entrio| ... }
71
+
72
+ Create an array of the .rb entries in a directory
73
+ anarray = rio('adir')['*.rb']
74
+
75
+ Iterate over the .rb files in a directory and its subdirectories
76
+ rio('adir').all.files('*.rb') { |entrio| ... }
77
+
78
+ Create an array of the .rb entries in a directory and its subdirectories
79
+ anarray = rio('adir').all['*.rb']
80
+
81
+ Create an array of the .rb files in a directory and its subdirectories
82
+ anarray = rio('adir').all.files['*.rb']
83
+
84
+ Copy an entire directory structure but only the .rb files from a directory and its subdirectories
85
+ into another directory
86
+ rio('adir').dirs.files('*.rb') > rio('another_directory')
87
+
88
+ Iterate over the chomped lines of a file
89
+ rio('afile').chomp.lines { |line| ... }
90
+
91
+ Put the chomped lines of a file into an array
92
+ anarray = rio('afile').chomp.lines[]
93
+
94
+ Iterate over the first 10 chomped lines of a file
95
+ rio('afile').chomp.lines(0..9) { |line| ... }
96
+
97
+ Put the first 10 chomped lines of a file into an array
98
+ anarray = rio('afile').chomp.lines[0..9]
99
+
100
+ Copy the first 10 lines of a file into another file
101
+ rio('afile').lines(0..9) > rio('another_file')
102
+
103
+ Copy the first 10 lines of a file to stdout
104
+ rio('afile').lines(0..9) > rio(?-)
105
+
106
+ Copy the first 10 lines of a gzipped file to stdout
107
+ rio('afile.gz').gzip.lines(0..9) > rio(?-)
108
+
109
+ Copy the first 10 lines of a gzipped file on an ftp server to stdout
110
+ rio('ftp://host/afile.gz').gzip.lines(0..9) > rio(?-)
111
+
112
+ Put the first 100 chomped lines of a gzipped file into an array
113
+ anarray = rio('afile.gz').gzip[0...100]
114
+
115
+ Copy the output of th ps command into an array, skipping the header line and the ps command entry
116
+ rio(?-,'ps -a').nolines(0,/ps$/) > anarray
117
+
118
+ Prompt for input and return what was typed
119
+ ans = rio(?-).print("Type Something: ").chomp.gets
120
+
121
+ Change the extension of all files with the extension '.htm' in a directory and its
122
+ subdirectories to have the extension '.html'
123
+ rio('adir').rename.all.files('*.htm') do |htmfile|
124
+ htmfile.extname = '.html'
125
+ end
126
+
127
+ Create a symbolic link 'asymlink' in 'adir' which refers to 'adir/afile'
128
+ rio('adir/afile').symlinke('adir/asymlink')
129
+
130
+
@@ -0,0 +1,895 @@
1
+ #
2
+ # = CSS2 RDoc HTML template
3
+ #
4
+ # This is a template for RDoc that uses XHTML 1.0 Transitional and dictates a
5
+ # bit more of the appearance of the output to cascading stylesheets than the
6
+ # default. It was designed for clean inline code display, and uses DHTMl to
7
+ # toggle the visbility of each method's source with each click on the '[source]'
8
+ # link.
9
+ #
10
+ # == Authors
11
+ #
12
+ # * Michael Granger <ged@FaerieMUD.org>
13
+ #
14
+ # Copyright (c) 2002, 2003 The FaerieMUD Consortium. Some rights reserved.
15
+ #
16
+ # This work is licensed under the Creative Commons Attribution License. To view
17
+ # a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or
18
+ # send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
19
+ # 94305, USA.
20
+ #
21
+
22
+ # Modified by Christopher Kleckner
23
+ # Copyright (c) 2005. Some rights reserved.
24
+ # Licensed under the same terms as the original
25
+
26
+
27
+ module RDoc
28
+ module Page
29
+
30
+ FONTS = "Verdana,Arial,Helvetica,sans-serif"
31
+
32
+ STYLE = %{
33
+ body {
34
+ font-family: Verdana,Arial,Helvetica,sans-serif;
35
+ font-size: 90%;
36
+ margin: 0;
37
+ margin-left: 40px;
38
+ padding: 0;
39
+ background: white;
40
+ }
41
+
42
+ h1,h2,h3,h4 { margin: 0; color: #8b4726; background: transparent; }
43
+ h1 { font-size: 150%; }
44
+ h2 { font-size: 140%; }
45
+ h3 { font-size: 130%; }
46
+ h4 { font-size: 120%; }
47
+ h2,h3,h4 { margin-top: 1em; }
48
+
49
+ a {
50
+ background: transparent;
51
+ color: #8b4500;
52
+ text-decoration: none;
53
+ }
54
+ a:hover {
55
+ color: #ffa500;
56
+ background: #8b4500;
57
+ }
58
+
59
+ /* Override the base stylesheet's Anchor inside a table cell */
60
+ td > a {
61
+ background: transparent;
62
+ color: #099;
63
+ text-decoration: none;
64
+ }
65
+
66
+ small {
67
+ font-size: 0.7em;
68
+ }
69
+ /* and inside a section title */
70
+ .section-title > a {
71
+ background: transparent;
72
+ color: #8b4500;
73
+ text-decoration: none;
74
+ }
75
+
76
+ /* === Structural elements =================================== */
77
+
78
+ div#index {
79
+ margin: 0;
80
+ margin-left: -40px;
81
+ padding: 0;
82
+ font-size: 90%;
83
+ background: #ffdead;
84
+ }
85
+
86
+
87
+ div#index a {
88
+ margin-left: 0.7em;
89
+ }
90
+ div#index-entries a {
91
+ background: transparent;
92
+ margin-left: 0.7em;
93
+ color: #8b4500;
94
+ }
95
+ div#index-entries a:hover {
96
+ background: transparent;
97
+ margin-left: 0.7em;
98
+ /* color: #ffdead; */
99
+ color: #ffdead;
100
+ background: #8b4500;
101
+ /*background: #ffdead;*/
102
+ }
103
+ .name-list a {
104
+ margin-left: 0.7em;
105
+ background: #ffdead;
106
+ color: #8b4500;
107
+ }
108
+ .name-list a:hover {
109
+ margin-left: 0.7em;
110
+ color: #ffdead;
111
+ background: #8b4500;
112
+ }
113
+ .section-bar {
114
+ color: #555;
115
+ /* background: #8b4500; */
116
+
117
+ border-bottom: 1px solid #999;
118
+ margin-left: -20px;
119
+ }
120
+
121
+ div#index .section-bar {
122
+ margin-left: 0px;
123
+ padding-left: 0.7em;
124
+ background: #8b4500;
125
+ color: #ffdead;
126
+ font-size: small;
127
+ }
128
+
129
+
130
+ .section-title {
131
+ /*background: #8b4500; */
132
+ background: #ffdead;
133
+ color: #eee;
134
+ padding: 3px;
135
+ margin-top: 2em;
136
+ margin-left: -30px;
137
+ border: 1px solid #999;
138
+ }
139
+
140
+ div#classHeader, div#fileHeader {
141
+ width: auto;
142
+ color: white;
143
+ padding: 0.5em 1.5em 0.5em 1.5em;
144
+ margin: 0;
145
+ margin-left: -40px;
146
+ border-bottom: 3px solid #006;
147
+ }
148
+
149
+ div#classHeader a, div#fileHeader a {
150
+ background: inherit;
151
+ color: white;
152
+ }
153
+
154
+ div#classHeader td, div#fileHeader td {
155
+ background: inherit;
156
+ color: white;
157
+ }
158
+
159
+
160
+ div#fileHeader {
161
+ background: #8b4500;
162
+
163
+ }
164
+ #fileHeader h1,#fileHeader h2,#fileHeader h3,#fileHeader h4 {
165
+ margin: 0;
166
+ color: #ffdead;
167
+ }
168
+
169
+ div#classHeader {
170
+ background: #8b4500;
171
+ }
172
+ td.class-header-space-col {
173
+ width: 2em;
174
+ }
175
+
176
+
177
+ .class-mod {
178
+ font-size: 110%;
179
+ font-weight: bold;
180
+ font-family: monospace;
181
+ text-transform: lowercase;
182
+ text-align: bottom;
183
+
184
+ }
185
+ .class-name-in-header {
186
+ font-size: 150%;
187
+ font-weight: bold;
188
+ font-family: monospace;
189
+ }
190
+ .in-url {
191
+ font-size: 80%
192
+ }
193
+
194
+ div#bodyContent {
195
+ padding: 0 1.5em 0 1.5em;
196
+ }
197
+
198
+
199
+ div#description {
200
+ padding: 0.5em 1.5em;
201
+ /* background: #efefef; */
202
+ background: #ffdead;
203
+ border: 1px dotted #999;
204
+ }
205
+
206
+ div#description h1,h2,h3,h4,h5,h6 {
207
+ color: #8b4500;
208
+ background: transparent;
209
+ }
210
+
211
+ div#validator-badges {
212
+ text-align: center;
213
+ }
214
+ div#validator-badges img { border: 0; }
215
+
216
+ div#copyright {
217
+ color: #333;
218
+ background: #efefef;
219
+ font: 0.75em sans-serif;
220
+ margin-top: 5em;
221
+ margin-bottom: 0;
222
+ padding: 0.5em 2em;
223
+ }
224
+
225
+
226
+ /* === Classes =================================== */
227
+
228
+ table.header-table {
229
+ color: white;
230
+ font-size: small;
231
+ }
232
+
233
+ .type-note {
234
+ font-size: small;
235
+ color: #DEDEDE;
236
+ }
237
+
238
+ .xxsection-bar {
239
+ background: #eee;
240
+ color: #333;
241
+ padding: 3px;
242
+ }
243
+
244
+
245
+
246
+ .section-title {
247
+ background: #79a;
248
+ color: #eee;
249
+ padding: 3px;
250
+ margin-top: 2em;
251
+ margin-left: -30px;
252
+ border: 1px solid #999;
253
+ }
254
+
255
+ .top-aligned-row { vertical-align: top }
256
+ .bottom-aligned-row { vertical-align: bottom }
257
+
258
+ /* --- Context section classes ----------------------- */
259
+
260
+ .context-row { }
261
+ .context-item-name { font-family: monospace; font-weight: bold; color: black; }
262
+ .context-item-value { font-size: small; color: #448; }
263
+ .context-item-desc { color: #333; padding-left: 2em; }
264
+
265
+ /* --- Method classes -------------------------- */
266
+ .method-detail {
267
+ background: #ffdead;
268
+ padding: 0;
269
+ margin-top: 0.5em;
270
+ margin-bottom: 1em;
271
+ border: 1px dotted #ccc;
272
+ }
273
+ .method-heading {
274
+ font-family: monospace;
275
+ font-weight: bold;
276
+ font-size: 130%;
277
+ color: #191970;
278
+ /* background: #b0c4de; */
279
+ background: #ffa07a;
280
+ border-bottom: 1px solid #666;
281
+ padding: 0.2em 0.5em 0 0.5em;
282
+ }
283
+ .method-heading a {
284
+ text-decoration: none;
285
+ }
286
+ .method-heading a:hover {
287
+ text-decoration: underline;
288
+ background: inherit;
289
+ color: inherit;
290
+ }
291
+ .method-signature { color: black; background: inherit; }
292
+ .method-name { font-weight: bold; }
293
+ .method-args { font-style: italic; }
294
+
295
+ .method-description { padding: 0 0.5em 0 0.5em; }
296
+ pre.method-description
297
+ {
298
+ padding: 0 0.5em 0 0.5em;
299
+ color: #ee2222;
300
+
301
+ }
302
+ #description pre
303
+ {
304
+ padding: 0.2em 0 0.2em 0;
305
+ margin: 0.3em 0 0.3em 0;
306
+ background: #fff8dc;
307
+ border-left: 2px solid #8b6508;
308
+ /* border-bottom: 1px solid #8b6508; */
309
+ /* border-top: 1px solid #8b6508; */
310
+ }
311
+ #description h1 {
312
+ color: #8b4500;
313
+ margin: 0.5em 0 0.2em 0;
314
+ /*border: 1px solid red;*/
315
+ }
316
+ #description h2 {
317
+ color: #8b4500;
318
+ margin: 0.5em 0 0.2em 0;
319
+ /*border: 1px solid red;*/
320
+ }
321
+ #description h3 {
322
+ color: #8b4500;
323
+ margin: 0.5em 0 0.2em 0;
324
+ /*border: 1px solid red;*/
325
+ }
326
+ #description h4 {
327
+ color: #8b4500;
328
+ margin: 0.5em 0 0.2em 0;
329
+ /*border: 1px solid red;*/
330
+ }
331
+ #description p {
332
+ margin: 0.5em 0 0.2em 0;
333
+ /*border: 1px solid red;*/
334
+ }
335
+ #description ul {
336
+ margin: 0.2em 0 0.5em 0;
337
+ /* border: 1px solid red; */
338
+ }
339
+ #description a {
340
+ background: #ffdead;
341
+ /* background: #eef; */
342
+ color: #8b4500;
343
+ text-decoration: none;
344
+ }
345
+ #description a:hover { text-decoration: underline; }
346
+ .method-description a {
347
+ background: #ffdead;
348
+ /* background: #eef; */
349
+ color: #8b4500;
350
+ text-decoration: none;
351
+ }
352
+ .method-description a:hover { text-decoration: underline; }
353
+
354
+ .method-description pre
355
+ {
356
+ padding: 0.2em 0 0.2em 0;
357
+ margin: 0.3em 0 0.3em 0;
358
+ background: #fff8dc;
359
+ border-left: 2px solid #8b6508;
360
+ }
361
+
362
+ .method-description table
363
+ {
364
+ border-top: 1px solid brown;
365
+ border-bottom: 1px solid brown;
366
+ margin: 0.4em 2em 0.4em 2em;
367
+ }
368
+ .method-description li
369
+ {
370
+ padding: 0 0 0 0;
371
+ margin: 0 0 0 0;
372
+
373
+ }
374
+ .method-description p {
375
+ margin: 0.5em 0 0.2em 0;
376
+ /* border: 1px solid red; */
377
+ }
378
+ .method-description tt {
379
+ margin: 0.5em 0 0.2em 0;
380
+ font-weight: bold;
381
+ color: navy;
382
+ }
383
+ .method-description ul {
384
+ margin: 0.2em 0 0.5em 0;
385
+ /* border: 1px solid red; */
386
+ }
387
+
388
+
389
+ /* --- Source code sections -------------------- */
390
+
391
+ a.source-toggle { font-size: 90%; }
392
+ div.method-source-code {
393
+ background: #262626;
394
+ color: #ffdead;
395
+ margin: 1em;
396
+ padding: 0.5em;
397
+ border: 1px dashed #999;
398
+ overflow: hidden;
399
+ }
400
+
401
+ div.method-source-code pre { color: #ffdead; overflow: hidden; }
402
+
403
+ /* --- Ruby keyword styles --------------------- */
404
+
405
+ .standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
406
+
407
+ .ruby-constant { color: #7fffd4; background: transparent; }
408
+ .ruby-keyword { color: #00ffff; background: transparent; }
409
+ .ruby-ivar { color: #eedd82; background: transparent; }
410
+ .ruby-operator { color: #00ffee; background: transparent; }
411
+ .ruby-identifier { color: #ffdead; background: transparent; }
412
+ .ruby-node { color: #ffa07a; background: transparent; }
413
+ .ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
414
+ .ruby-regexp { color: #ffa07a; background: transparent; }
415
+ .ruby-value { color: #7fffd4; background: transparent; }
416
+ }
417
+
418
+
419
+ #####################################################################
420
+ ### H E A D E R T E M P L A T E
421
+ #####################################################################
422
+
423
+ XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
424
+ <!DOCTYPE html
425
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
426
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
427
+ }
428
+
429
+ HEADER = XHTML_PREAMBLE + %{
430
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
431
+ <head>
432
+ <title>%title%</title>
433
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
434
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
435
+ <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
436
+ <script type="text/javascript">
437
+ // <![CDATA[
438
+
439
+ function popupCode( url ) {
440
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
441
+ }
442
+
443
+ function toggleCode( id ) {
444
+ if ( document.getElementById )
445
+ elem = document.getElementById( id );
446
+ else if ( document.all )
447
+ elem = eval( "document.all." + id );
448
+ else
449
+ return false;
450
+
451
+ elemStyle = elem.style;
452
+
453
+ if ( elemStyle.display != "block" ) {
454
+ elemStyle.display = "block"
455
+ } else {
456
+ elemStyle.display = "none"
457
+ }
458
+
459
+ return true;
460
+ }
461
+
462
+ // Make codeblocks hidden by default
463
+ document.writeln( "<style type=\\"text/css\\">div.method-source-code { display: none }</style>" )
464
+
465
+ // ]]>
466
+ </script>
467
+
468
+ </head>
469
+ <body>
470
+ }
471
+
472
+
473
+ #####################################################################
474
+ ### C O N T E X T C O N T E N T T E M P L A T E
475
+ #####################################################################
476
+
477
+ CONTEXT_CONTENT = %{
478
+ }
479
+
480
+
481
+ #####################################################################
482
+ ### F O O T E R T E M P L A T E
483
+ #####################################################################
484
+ FOOTER = %{
485
+ <div id="validator-badges">
486
+ <p><small>Copyright &copy; 2005 Christopher Kleckner. <a href="http://www.gnu.org/licenses/gpl.html">All rights reserved</a>.</small></p>
487
+ </div>
488
+
489
+ </body>
490
+ </html>
491
+ }
492
+
493
+
494
+ #####################################################################
495
+ ### F I L E P A G E H E A D E R T E M P L A T E
496
+ #####################################################################
497
+
498
+ FILE_PAGE = %{
499
+ <div id="fileHeader">
500
+ <h1>%short_name%</h1>
501
+ <table class="header-table">
502
+ <tr class="top-aligned-row">
503
+ <td><strong>Path:</strong></td>
504
+ <td>%full_path%
505
+ IF:cvsurl
506
+ &nbsp;(<a href="%cvsurl%">CVS</a>)
507
+ ENDIF:cvsurl
508
+ </td>
509
+ </tr>
510
+ <tr class="top-aligned-row">
511
+ <td><strong>Last Update:</strong></td>
512
+ <td>%dtm_modified%</td>
513
+ </tr>
514
+ </table>
515
+ </div>
516
+ }
517
+
518
+
519
+ #####################################################################
520
+ ### C L A S S P A G E H E A D E R T E M P L A T E
521
+ #####################################################################
522
+
523
+ CLASS_PAGE = %{
524
+ <div id="classHeader">
525
+ <table class="header-table">
526
+ <tr class="top-aligned-row">
527
+ <td class="class-mod"><strong>%classmod%</strong></td>
528
+ <td class="class-name-in-header">%full_name%</td>
529
+ <td rowspan="2" class="class-header-space-col"></td>
530
+ <td rowspan="2">
531
+ START:infiles
532
+ IF:full_path_url
533
+ <a class="in-url" href="%full_path_url%">
534
+ ENDIF:full_path_url
535
+ %full_path%
536
+ IF:full_path_url
537
+ </a>
538
+ ENDIF:full_path_url
539
+ IF:cvsurl
540
+ &nbsp;(<a href="%cvsurl%">CVS</a>)
541
+ ENDIF:cvsurl
542
+ &nbsp;&nbsp;
543
+ END:infiles
544
+ </td>
545
+ </tr>
546
+
547
+ IF:parent
548
+ <tr class="top-aligned-row">
549
+ <td><strong>Parent:</strong></td>
550
+ <td>
551
+ IF:par_url
552
+ <a href="%par_url%">
553
+ ENDIF:par_url
554
+ %parent%
555
+ IF:par_url
556
+ </a>
557
+ ENDIF:par_url
558
+ </td>
559
+ </tr>
560
+ ENDIF:parent
561
+ </table>
562
+ </div>
563
+ }
564
+
565
+
566
+ #####################################################################
567
+ ### M E T H O D L I S T T E M P L A T E
568
+ #####################################################################
569
+
570
+ METHOD_LIST = %{
571
+
572
+ <div id="contextContent">
573
+ IF:diagram
574
+ <div id="diagram">
575
+ %diagram%
576
+ </div>
577
+ ENDIF:diagram
578
+
579
+ IF:description
580
+ <div id="description">
581
+ %description%
582
+ </div>
583
+ ENDIF:description
584
+
585
+ IF:requires
586
+ <div id="requires-list">
587
+ <h3 class="section-bar">Required files</h3>
588
+
589
+ <div class="name-list">
590
+ START:requires
591
+ HREF:aref:name:&nbsp;&nbsp;
592
+ END:requires
593
+ </div>
594
+ </div>
595
+ ENDIF:requires
596
+
597
+ IF:toc
598
+ <div id="contents-list">
599
+ <h3 class="section-bar">Contents</h3>
600
+ <ul>
601
+ START:toc
602
+ <li><a href="#%href%">%secname%</a></li>
603
+ END:toc
604
+ </ul>
605
+ ENDIF:toc
606
+ </div>
607
+
608
+ IF:methods
609
+ <div id="method-list">
610
+ <h3 class="section-bar">Methods</h3>
611
+
612
+ <div class="name-list">
613
+ START:methods
614
+ HREF:aref:name:&nbsp;&nbsp;
615
+ END:methods
616
+ </div>
617
+ </div>
618
+ ENDIF:methods
619
+
620
+ </div>
621
+
622
+
623
+ <!-- if includes -->
624
+ IF:includes
625
+ <div id="includes">
626
+ <h3 class="section-bar">Included Modules</h3>
627
+
628
+ <div id="includes-list">
629
+ START:includes
630
+ <span class="include-name">HREF:aref:name:</span>
631
+ END:includes
632
+ </div>
633
+ </div>
634
+ ENDIF:includes
635
+
636
+ START:sections
637
+ <div id="section">
638
+ IF:sectitle
639
+ <h2 class="section-title"><a name="%secsequence%">%sectitle%</a></h2>
640
+ IF:seccomment
641
+ <div class="section-comment">
642
+ %seccomment%
643
+ </div>
644
+ ENDIF:seccomment
645
+ ENDIF:sectitle
646
+
647
+ IF:classlist
648
+ <div id="class-list">
649
+ <h3 class="section-bar">Classes and Modules</h3>
650
+
651
+ %classlist%
652
+ </div>
653
+ ENDIF:classlist
654
+
655
+ IF:constants
656
+ <div id="constants-list">
657
+ <h3 class="section-bar">Constants</h3>
658
+
659
+ <div class="name-list">
660
+ <table summary="Constants">
661
+ START:constants
662
+ <tr class="top-aligned-row context-row">
663
+ <td class="context-item-name">%name%</td>
664
+ <td>=</td>
665
+ <td class="context-item-value">%value%</td>
666
+ IF:desc
667
+ <td width="3em">&nbsp;</td>
668
+ <td class="context-item-desc">%desc%</td>
669
+ ENDIF:desc
670
+ </tr>
671
+ END:constants
672
+ </table>
673
+ </div>
674
+ </div>
675
+ ENDIF:constants
676
+
677
+ IF:aliases
678
+ <div id="aliases-list">
679
+ <h3 class="section-bar">External Aliases</h3>
680
+
681
+ <div class="name-list">
682
+ <table summary="aliases">
683
+ START:aliases
684
+ <tr class="top-aligned-row context-row">
685
+ <td class="context-item-name">%old_name%</td>
686
+ <td>-></td>
687
+ <td class="context-item-value">%new_name%</td>
688
+ </tr>
689
+ IF:desc
690
+ <tr class="top-aligned-row context-row">
691
+ <td>&nbsp;</td>
692
+ <td colspan="2" class="context-item-desc">%desc%</td>
693
+ </tr>
694
+ ENDIF:desc
695
+ END:aliases
696
+ </table>
697
+ </div>
698
+ </div>
699
+ ENDIF:aliases
700
+
701
+
702
+ IF:attributes
703
+ <div id="attribute-list">
704
+ <h3 class="section-bar">Attributes</h3>
705
+
706
+ <div class="name-list">
707
+ <table>
708
+ START:attributes
709
+ <tr class="top-aligned-row context-row">
710
+ <td class="context-item-name">%name%</td>
711
+ IF:rw
712
+ <td class="context-item-value">&nbsp;[%rw%]&nbsp;</td>
713
+ ENDIF:rw
714
+ IFNOT:rw
715
+ <td class="context-item-value">&nbsp;&nbsp;</td>
716
+ ENDIF:rw
717
+ <td class="context-item-desc">%a_desc%</td>
718
+ </tr>
719
+ END:attributes
720
+ </table>
721
+ </div>
722
+ </div>
723
+ ENDIF:attributes
724
+
725
+
726
+
727
+ <!-- if method_list -->
728
+ IF:method_list
729
+ <div id="methods">
730
+ START:method_list
731
+ IF:methods
732
+ <h3 class="section-bar">%type% %category% methods</h3>
733
+
734
+ START:methods
735
+ <div id="method-%aref%" class="method-detail">
736
+ <a name="%aref%"></a>
737
+
738
+ <div class="method-heading">
739
+ IF:codeurl
740
+ <a href="%codeurl%" target="Code" class="method-signature"
741
+ onclick="popupCode('%codeurl%');return false;">
742
+ ENDIF:codeurl
743
+ IF:sourcecode
744
+ <a href="#%aref%" class="method-signature">
745
+ ENDIF:sourcecode
746
+ IF:callseq
747
+ <span class="method-name">%callseq%</span>
748
+ ENDIF:callseq
749
+ IFNOT:callseq
750
+ <span class="method-name">%name%</span><span class="method-args">%params%</span>
751
+ ENDIF:callseq
752
+ IF:codeurl
753
+ </a>
754
+ ENDIF:codeurl
755
+ IF:sourcecode
756
+ </a>
757
+ ENDIF:sourcecode
758
+ </div>
759
+
760
+ <div class="method-description">
761
+ IF:m_desc
762
+ %m_desc%
763
+ ENDIF:m_desc
764
+ IF:sourcecode
765
+ <p><a class="source-toggle" href="#"
766
+ onclick="toggleCode('%aref%-source');return false;">[Source]</a></p>
767
+ <div class="method-source-code" id="%aref%-source">
768
+ <pre>
769
+ %sourcecode%
770
+ </pre>
771
+ </div>
772
+ ENDIF:sourcecode
773
+ </div>
774
+ </div>
775
+
776
+ END:methods
777
+ ENDIF:methods
778
+ END:method_list
779
+
780
+ </div>
781
+ ENDIF:method_list
782
+ END:sections
783
+ }
784
+ #def mlist(*args)
785
+ #p(args)
786
+ # METHOD_LIST0
787
+ #end
788
+ #module_function :mlist
789
+ #METHOD_LIST = mlist()
790
+
791
+ #####################################################################
792
+ ### B O D Y T E M P L A T E
793
+ #####################################################################
794
+
795
+ BODY = HEADER + %{
796
+
797
+ !INCLUDE! <!-- banner header -->
798
+
799
+ <div id="bodyContent">
800
+
801
+ } + METHOD_LIST + %{
802
+
803
+ </div>
804
+
805
+ } + FOOTER
806
+
807
+
808
+
809
+ #####################################################################
810
+ ### S O U R C E C O D E T E M P L A T E
811
+ #####################################################################
812
+
813
+ SRC_PAGE = XHTML_PREAMBLE + %{
814
+ <html>
815
+ <head>
816
+ <title>%title%</title>
817
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
818
+ <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
819
+ </head>
820
+ <body class="standalone-code">
821
+ <pre>%code%</pre>
822
+ </body>
823
+ </html>
824
+ }
825
+
826
+
827
+ #####################################################################
828
+ ### I N D E X F I L E T E M P L A T E S
829
+ #####################################################################
830
+
831
+ FR_INDEX_BODY = %{
832
+ !INCLUDE!
833
+ }
834
+
835
+ FILE_INDEX = XHTML_PREAMBLE + %{
836
+ <!--
837
+
838
+ %list_title%
839
+
840
+ -->
841
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
842
+ <head>
843
+ <title>%list_title%</title>
844
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
845
+ <link rel="stylesheet" href="%style_url%" type="text/css" />
846
+ <base target="docwin" />
847
+ </head>
848
+ <body>
849
+ <div id="index">
850
+ <h1 class="section-bar">%list_title%</h1>
851
+ <div id="index-entries">
852
+ START:entries
853
+ <a href="%href%">%name%</a><br />
854
+ END:entries
855
+ </div>
856
+ </div>
857
+ </body>
858
+ </html>
859
+ }
860
+
861
+ CLASS_INDEX = FILE_INDEX
862
+ METHOD_INDEX = FILE_INDEX
863
+
864
+ INDEX = %{<?xml version="1.0" encoding="%charset%"?>
865
+ <!DOCTYPE html
866
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
867
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
868
+
869
+ <!--
870
+
871
+ %title%
872
+
873
+ -->
874
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
875
+ <head>
876
+ <title>%title%</title>
877
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
878
+ </head>
879
+ <frameset rows="20%, 80%">
880
+ <frameset cols="25%,35%,45%">
881
+ <frame src="fr_file_index.html" title="Files" name="Files" />
882
+ <frame src="fr_class_index.html" name="Classes" />
883
+ <frame src="fr_method_index.html" name="Methods" />
884
+ </frameset>
885
+ <frame src="%initial_page%" name="docwin" />
886
+ </frameset>
887
+ </html>
888
+ }
889
+
890
+
891
+
892
+ end # module Page
893
+ end # class RDoc
894
+
895
+ require 'rdoc/generators/template/html/one_page_html'