rio 0.3.4 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (349) hide show
  1. data/ChangeLog +287 -0
  2. data/Rakefile +7 -9
  3. data/VERSION +1 -1
  4. data/doc/ANNOUNCE +20 -1
  5. data/doc/RELEASE_NOTES +41 -0
  6. data/doc/rdoc/classes/Kernel.html +181 -0
  7. data/doc/rdoc/classes/Kernel.src/M000214.html +18 -0
  8. data/doc/rdoc/classes/RIO.html +621 -0
  9. data/doc/rdoc/classes/RIO.src/M000001.html +18 -0
  10. data/doc/rdoc/classes/RIO.src/M000002.html +18 -0
  11. data/doc/rdoc/classes/RIO.src/M000003.html +18 -0
  12. data/doc/rdoc/classes/RIO/Doc.html +138 -0
  13. data/doc/rdoc/classes/RIO/Doc/HOWTO.html +1040 -0
  14. data/doc/rdoc/classes/RIO/Doc/INTRO.html +1613 -0
  15. data/doc/rdoc/classes/RIO/Doc/MISC.html +443 -0
  16. data/doc/rdoc/classes/RIO/Doc/SYNOPSIS.html +338 -0
  17. data/doc/rdoc/classes/RIO/IF.html +114 -0
  18. data/doc/rdoc/classes/RIO/IF/CSV.html +202 -0
  19. data/doc/rdoc/classes/RIO/IF/CSV.src/M000004.html +19 -0
  20. data/doc/rdoc/classes/RIO/IF/CSV.src/M000005.html +16 -0
  21. data/doc/rdoc/classes/RIO/IF/CSV.src/M000006.html +16 -0
  22. data/doc/rdoc/classes/RIO/IF/YAML.html +499 -0
  23. data/doc/rdoc/classes/RIO/IF/YAML.src/M000007.html +19 -0
  24. data/doc/rdoc/classes/RIO/IF/YAML.src/M000008.html +16 -0
  25. data/doc/rdoc/classes/RIO/IF/YAML.src/M000009.html +16 -0
  26. data/doc/rdoc/classes/RIO/IF/YAML.src/M000010.html +16 -0
  27. data/doc/rdoc/classes/RIO/IF/YAML.src/M000011.html +16 -0
  28. data/doc/rdoc/classes/RIO/IF/YAML.src/M000012.html +16 -0
  29. data/doc/rdoc/classes/RIO/IF/YAML.src/M000013.html +16 -0
  30. data/doc/rdoc/classes/RIO/IF/YAML.src/M000014.html +16 -0
  31. data/doc/rdoc/classes/RIO/IF/YAML.src/M000015.html +16 -0
  32. data/doc/rdoc/classes/RIO/IF/YAML.src/M000016.html +16 -0
  33. data/doc/rdoc/classes/RIO/IF/YAML.src/M000017.html +16 -0
  34. data/doc/rdoc/classes/RIO/Rio.html +7121 -0
  35. data/doc/rdoc/classes/RIO/Rio.src/M000018.html +18 -0
  36. data/doc/rdoc/classes/RIO/Rio.src/M000019.html +20 -0
  37. data/doc/rdoc/classes/RIO/Rio.src/M000020.html +27 -0
  38. data/doc/rdoc/classes/RIO/Rio.src/M000021.html +16 -0
  39. data/doc/rdoc/classes/RIO/Rio.src/M000023.html +19 -0
  40. data/doc/rdoc/classes/RIO/Rio.src/M000024.html +20 -0
  41. data/doc/rdoc/classes/RIO/Rio.src/M000025.html +16 -0
  42. data/doc/rdoc/classes/RIO/Rio.src/M000026.html +16 -0
  43. data/doc/rdoc/classes/RIO/Rio.src/M000027.html +16 -0
  44. data/doc/rdoc/classes/RIO/Rio.src/M000028.html +16 -0
  45. data/doc/rdoc/classes/RIO/Rio.src/M000029.html +16 -0
  46. data/doc/rdoc/classes/RIO/Rio.src/M000030.html +16 -0
  47. data/doc/rdoc/classes/RIO/Rio.src/M000031.html +16 -0
  48. data/doc/rdoc/classes/RIO/Rio.src/M000032.html +16 -0
  49. data/doc/rdoc/classes/RIO/Rio.src/M000033.html +16 -0
  50. data/doc/rdoc/classes/RIO/Rio.src/M000034.html +16 -0
  51. data/doc/rdoc/classes/RIO/Rio.src/M000035.html +16 -0
  52. data/doc/rdoc/classes/RIO/Rio.src/M000036.html +16 -0
  53. data/doc/rdoc/classes/RIO/Rio.src/M000037.html +16 -0
  54. data/doc/rdoc/classes/RIO/Rio.src/M000038.html +16 -0
  55. data/doc/rdoc/classes/RIO/Rio.src/M000039.html +16 -0
  56. data/doc/rdoc/classes/RIO/Rio.src/M000040.html +16 -0
  57. data/doc/rdoc/classes/RIO/Rio.src/M000041.html +16 -0
  58. data/doc/rdoc/classes/RIO/Rio.src/M000042.html +16 -0
  59. data/doc/rdoc/classes/RIO/Rio.src/M000043.html +16 -0
  60. data/doc/rdoc/classes/RIO/Rio.src/M000044.html +16 -0
  61. data/doc/rdoc/classes/RIO/Rio.src/M000045.html +16 -0
  62. data/doc/rdoc/classes/RIO/Rio.src/M000046.html +16 -0
  63. data/doc/rdoc/classes/RIO/Rio.src/M000047.html +16 -0
  64. data/doc/rdoc/classes/RIO/Rio.src/M000048.html +16 -0
  65. data/doc/rdoc/classes/RIO/Rio.src/M000049.html +16 -0
  66. data/doc/rdoc/classes/RIO/Rio.src/M000050.html +16 -0
  67. data/doc/rdoc/classes/RIO/Rio.src/M000051.html +16 -0
  68. data/doc/rdoc/classes/RIO/Rio.src/M000052.html +16 -0
  69. data/doc/rdoc/classes/RIO/Rio.src/M000053.html +16 -0
  70. data/doc/rdoc/classes/RIO/Rio.src/M000054.html +16 -0
  71. data/doc/rdoc/classes/RIO/Rio.src/M000055.html +16 -0
  72. data/doc/rdoc/classes/RIO/Rio.src/M000056.html +16 -0
  73. data/doc/rdoc/classes/RIO/Rio.src/M000057.html +16 -0
  74. data/doc/rdoc/classes/RIO/Rio.src/M000058.html +16 -0
  75. data/doc/rdoc/classes/RIO/Rio.src/M000059.html +16 -0
  76. data/doc/rdoc/classes/RIO/Rio.src/M000060.html +16 -0
  77. data/doc/rdoc/classes/RIO/Rio.src/M000061.html +16 -0
  78. data/doc/rdoc/classes/RIO/Rio.src/M000062.html +16 -0
  79. data/doc/rdoc/classes/RIO/Rio.src/M000063.html +16 -0
  80. data/doc/rdoc/classes/RIO/Rio.src/M000064.html +16 -0
  81. data/doc/rdoc/classes/RIO/Rio.src/M000065.html +16 -0
  82. data/doc/rdoc/classes/RIO/Rio.src/M000066.html +16 -0
  83. data/doc/rdoc/classes/RIO/Rio.src/M000067.html +16 -0
  84. data/doc/rdoc/classes/RIO/Rio.src/M000068.html +16 -0
  85. data/doc/rdoc/classes/RIO/Rio.src/M000069.html +16 -0
  86. data/doc/rdoc/classes/RIO/Rio.src/M000070.html +16 -0
  87. data/doc/rdoc/classes/RIO/Rio.src/M000071.html +16 -0
  88. data/doc/rdoc/classes/RIO/Rio.src/M000072.html +16 -0
  89. data/doc/rdoc/classes/RIO/Rio.src/M000073.html +16 -0
  90. data/doc/rdoc/classes/RIO/Rio.src/M000074.html +16 -0
  91. data/doc/rdoc/classes/RIO/Rio.src/M000075.html +16 -0
  92. data/doc/rdoc/classes/RIO/Rio.src/M000076.html +16 -0
  93. data/doc/rdoc/classes/RIO/Rio.src/M000077.html +16 -0
  94. data/doc/rdoc/classes/RIO/Rio.src/M000078.html +16 -0
  95. data/doc/rdoc/classes/RIO/Rio.src/M000079.html +16 -0
  96. data/doc/rdoc/classes/RIO/Rio.src/M000080.html +16 -0
  97. data/doc/rdoc/classes/RIO/Rio.src/M000081.html +16 -0
  98. data/doc/rdoc/classes/RIO/Rio.src/M000082.html +16 -0
  99. data/doc/rdoc/classes/RIO/Rio.src/M000083.html +16 -0
  100. data/doc/rdoc/classes/RIO/Rio.src/M000084.html +16 -0
  101. data/doc/rdoc/classes/RIO/Rio.src/M000085.html +16 -0
  102. data/doc/rdoc/classes/RIO/Rio.src/M000086.html +16 -0
  103. data/doc/rdoc/classes/RIO/Rio.src/M000087.html +16 -0
  104. data/doc/rdoc/classes/RIO/Rio.src/M000088.html +16 -0
  105. data/doc/rdoc/classes/RIO/Rio.src/M000089.html +16 -0
  106. data/doc/rdoc/classes/RIO/Rio.src/M000090.html +16 -0
  107. data/doc/rdoc/classes/RIO/Rio.src/M000091.html +16 -0
  108. data/doc/rdoc/classes/RIO/Rio.src/M000092.html +16 -0
  109. data/doc/rdoc/classes/RIO/Rio.src/M000093.html +16 -0
  110. data/doc/rdoc/classes/RIO/Rio.src/M000094.html +16 -0
  111. data/doc/rdoc/classes/RIO/Rio.src/M000095.html +16 -0
  112. data/doc/rdoc/classes/RIO/Rio.src/M000096.html +16 -0
  113. data/doc/rdoc/classes/RIO/Rio.src/M000097.html +16 -0
  114. data/doc/rdoc/classes/RIO/Rio.src/M000098.html +16 -0
  115. data/doc/rdoc/classes/RIO/Rio.src/M000099.html +16 -0
  116. data/doc/rdoc/classes/RIO/Rio.src/M000100.html +16 -0
  117. data/doc/rdoc/classes/RIO/Rio.src/M000101.html +16 -0
  118. data/doc/rdoc/classes/RIO/Rio.src/M000102.html +16 -0
  119. data/doc/rdoc/classes/RIO/Rio.src/M000103.html +16 -0
  120. data/doc/rdoc/classes/RIO/Rio.src/M000104.html +16 -0
  121. data/doc/rdoc/classes/RIO/Rio.src/M000105.html +16 -0
  122. data/doc/rdoc/classes/RIO/Rio.src/M000106.html +16 -0
  123. data/doc/rdoc/classes/RIO/Rio.src/M000107.html +16 -0
  124. data/doc/rdoc/classes/RIO/Rio.src/M000108.html +16 -0
  125. data/doc/rdoc/classes/RIO/Rio.src/M000109.html +16 -0
  126. data/doc/rdoc/classes/RIO/Rio.src/M000110.html +16 -0
  127. data/doc/rdoc/classes/RIO/Rio.src/M000111.html +16 -0
  128. data/doc/rdoc/classes/RIO/Rio.src/M000112.html +16 -0
  129. data/doc/rdoc/classes/RIO/Rio.src/M000113.html +16 -0
  130. data/doc/rdoc/classes/RIO/Rio.src/M000114.html +16 -0
  131. data/doc/rdoc/classes/RIO/Rio.src/M000115.html +16 -0
  132. data/doc/rdoc/classes/RIO/Rio.src/M000116.html +16 -0
  133. data/doc/rdoc/classes/RIO/Rio.src/M000117.html +16 -0
  134. data/doc/rdoc/classes/RIO/Rio.src/M000118.html +16 -0
  135. data/doc/rdoc/classes/RIO/Rio.src/M000119.html +16 -0
  136. data/doc/rdoc/classes/RIO/Rio.src/M000120.html +16 -0
  137. data/doc/rdoc/classes/RIO/Rio.src/M000121.html +16 -0
  138. data/doc/rdoc/classes/RIO/Rio.src/M000122.html +16 -0
  139. data/doc/rdoc/classes/RIO/Rio.src/M000123.html +16 -0
  140. data/doc/rdoc/classes/RIO/Rio.src/M000124.html +16 -0
  141. data/doc/rdoc/classes/RIO/Rio.src/M000125.html +16 -0
  142. data/doc/rdoc/classes/RIO/Rio.src/M000126.html +16 -0
  143. data/doc/rdoc/classes/RIO/Rio.src/M000127.html +16 -0
  144. data/doc/rdoc/classes/RIO/Rio.src/M000128.html +16 -0
  145. data/doc/rdoc/classes/RIO/Rio.src/M000129.html +16 -0
  146. data/doc/rdoc/classes/RIO/Rio.src/M000130.html +16 -0
  147. data/doc/rdoc/classes/RIO/Rio.src/M000131.html +16 -0
  148. data/doc/rdoc/classes/RIO/Rio.src/M000132.html +16 -0
  149. data/doc/rdoc/classes/RIO/Rio.src/M000133.html +16 -0
  150. data/doc/rdoc/classes/RIO/Rio.src/M000134.html +16 -0
  151. data/doc/rdoc/classes/RIO/Rio.src/M000135.html +16 -0
  152. data/doc/rdoc/classes/RIO/Rio.src/M000136.html +16 -0
  153. data/doc/rdoc/classes/RIO/Rio.src/M000137.html +16 -0
  154. data/doc/rdoc/classes/RIO/Rio.src/M000138.html +16 -0
  155. data/doc/rdoc/classes/RIO/Rio.src/M000139.html +16 -0
  156. data/doc/rdoc/classes/RIO/Rio.src/M000140.html +16 -0
  157. data/doc/rdoc/classes/RIO/Rio.src/M000141.html +16 -0
  158. data/doc/rdoc/classes/RIO/Rio.src/M000142.html +16 -0
  159. data/doc/rdoc/classes/RIO/Rio.src/M000143.html +16 -0
  160. data/doc/rdoc/classes/RIO/Rio.src/M000144.html +16 -0
  161. data/doc/rdoc/classes/RIO/Rio.src/M000145.html +16 -0
  162. data/doc/rdoc/classes/RIO/Rio.src/M000146.html +16 -0
  163. data/doc/rdoc/classes/RIO/Rio.src/M000147.html +16 -0
  164. data/doc/rdoc/classes/RIO/Rio.src/M000148.html +16 -0
  165. data/doc/rdoc/classes/RIO/Rio.src/M000149.html +16 -0
  166. data/doc/rdoc/classes/RIO/Rio.src/M000150.html +16 -0
  167. data/doc/rdoc/classes/RIO/Rio.src/M000151.html +16 -0
  168. data/doc/rdoc/classes/RIO/Rio.src/M000152.html +16 -0
  169. data/doc/rdoc/classes/RIO/Rio.src/M000153.html +16 -0
  170. data/doc/rdoc/classes/RIO/Rio.src/M000154.html +16 -0
  171. data/doc/rdoc/classes/RIO/Rio.src/M000155.html +16 -0
  172. data/doc/rdoc/classes/RIO/Rio.src/M000156.html +16 -0
  173. data/doc/rdoc/classes/RIO/Rio.src/M000157.html +16 -0
  174. data/doc/rdoc/classes/RIO/Rio.src/M000158.html +16 -0
  175. data/doc/rdoc/classes/RIO/Rio.src/M000159.html +16 -0
  176. data/doc/rdoc/classes/RIO/Rio.src/M000160.html +16 -0
  177. data/doc/rdoc/classes/RIO/Rio.src/M000161.html +16 -0
  178. data/doc/rdoc/classes/RIO/Rio.src/M000162.html +16 -0
  179. data/doc/rdoc/classes/RIO/Rio.src/M000163.html +16 -0
  180. data/doc/rdoc/classes/RIO/Rio.src/M000164.html +16 -0
  181. data/doc/rdoc/classes/RIO/Rio.src/M000165.html +16 -0
  182. data/doc/rdoc/classes/RIO/Rio.src/M000166.html +16 -0
  183. data/doc/rdoc/classes/RIO/Rio.src/M000167.html +16 -0
  184. data/doc/rdoc/classes/RIO/Rio.src/M000168.html +16 -0
  185. data/doc/rdoc/classes/RIO/Rio.src/M000169.html +16 -0
  186. data/doc/rdoc/classes/RIO/Rio.src/M000170.html +16 -0
  187. data/doc/rdoc/classes/RIO/Rio.src/M000171.html +16 -0
  188. data/doc/rdoc/classes/RIO/Rio.src/M000172.html +16 -0
  189. data/doc/rdoc/classes/RIO/Rio.src/M000173.html +16 -0
  190. data/doc/rdoc/classes/RIO/Rio.src/M000174.html +16 -0
  191. data/doc/rdoc/classes/RIO/Rio.src/M000175.html +16 -0
  192. data/doc/rdoc/classes/RIO/Rio.src/M000176.html +16 -0
  193. data/doc/rdoc/classes/RIO/Rio.src/M000177.html +16 -0
  194. data/doc/rdoc/classes/RIO/Rio.src/M000178.html +16 -0
  195. data/doc/rdoc/classes/RIO/Rio.src/M000179.html +16 -0
  196. data/doc/rdoc/classes/RIO/Rio.src/M000180.html +16 -0
  197. data/doc/rdoc/classes/RIO/Rio.src/M000181.html +16 -0
  198. data/doc/rdoc/classes/RIO/Rio.src/M000182.html +16 -0
  199. data/doc/rdoc/classes/RIO/Rio.src/M000183.html +16 -0
  200. data/doc/rdoc/classes/RIO/Rio.src/M000184.html +16 -0
  201. data/doc/rdoc/classes/RIO/Rio.src/M000185.html +16 -0
  202. data/doc/rdoc/classes/RIO/Rio.src/M000186.html +16 -0
  203. data/doc/rdoc/classes/RIO/Rio.src/M000187.html +16 -0
  204. data/doc/rdoc/classes/RIO/Rio.src/M000188.html +16 -0
  205. data/doc/rdoc/classes/RIO/Rio.src/M000189.html +16 -0
  206. data/doc/rdoc/classes/RIO/Rio.src/M000190.html +16 -0
  207. data/doc/rdoc/classes/RIO/Rio.src/M000191.html +16 -0
  208. data/doc/rdoc/classes/RIO/Rio.src/M000192.html +16 -0
  209. data/doc/rdoc/classes/RIO/Rio.src/M000193.html +16 -0
  210. data/doc/rdoc/classes/RIO/Rio.src/M000194.html +16 -0
  211. data/doc/rdoc/classes/RIO/Rio.src/M000195.html +16 -0
  212. data/doc/rdoc/classes/RIO/Rio.src/M000196.html +16 -0
  213. data/doc/rdoc/classes/RIO/Rio.src/M000197.html +16 -0
  214. data/doc/rdoc/classes/RIO/Rio.src/M000198.html +16 -0
  215. data/doc/rdoc/classes/RIO/Rio.src/M000199.html +16 -0
  216. data/doc/rdoc/classes/RIO/Rio.src/M000200.html +16 -0
  217. data/doc/rdoc/classes/RIO/Rio.src/M000201.html +16 -0
  218. data/doc/rdoc/classes/RIO/Rio.src/M000202.html +16 -0
  219. data/doc/rdoc/classes/RIO/Rio.src/M000203.html +16 -0
  220. data/doc/rdoc/classes/RIO/Rio.src/M000204.html +16 -0
  221. data/doc/rdoc/classes/RIO/Rio.src/M000205.html +16 -0
  222. data/doc/rdoc/classes/RIO/Rio.src/M000206.html +16 -0
  223. data/doc/rdoc/classes/RIO/Rio.src/M000207.html +16 -0
  224. data/doc/rdoc/classes/RIO/Rio.src/M000208.html +16 -0
  225. data/doc/rdoc/classes/RIO/Rio.src/M000209.html +16 -0
  226. data/doc/rdoc/classes/RIO/Rio.src/M000210.html +16 -0
  227. data/doc/rdoc/classes/RIO/Rio.src/M000211.html +16 -0
  228. data/doc/rdoc/classes/RIO/Rio.src/M000212.html +16 -0
  229. data/doc/rdoc/classes/RIO/Rio.src/M000213.html +16 -0
  230. data/doc/rdoc/created.rid +1 -0
  231. data/doc/rdoc/files/README.html +243 -0
  232. data/doc/rdoc/files/lib/rio/constructor_rb.html +142 -0
  233. data/doc/rdoc/files/lib/rio/doc/HOWTO_rb.html +135 -0
  234. data/doc/rdoc/files/lib/rio/doc/INTRO_rb.html +135 -0
  235. data/doc/rdoc/files/lib/rio/doc/MISC_rb.html +135 -0
  236. data/doc/rdoc/files/lib/rio/doc/SYNOPSIS_rb.html +135 -0
  237. data/doc/rdoc/files/lib/rio/if/basic_rb.html +135 -0
  238. data/doc/rdoc/files/lib/rio/if/csv_rb.html +135 -0
  239. data/doc/rdoc/files/lib/rio/if/dir_rb.html +135 -0
  240. data/doc/rdoc/files/lib/rio/if/file_rb.html +135 -0
  241. data/doc/rdoc/files/lib/rio/if/fileordir_rb.html +135 -0
  242. data/doc/rdoc/files/lib/rio/if/grande_entry_rb.html +135 -0
  243. data/doc/rdoc/files/lib/rio/if/grande_rb.html +135 -0
  244. data/doc/rdoc/files/lib/rio/if/grande_stream_rb.html +135 -0
  245. data/doc/rdoc/files/lib/rio/if/internal_rb.html +135 -0
  246. data/doc/rdoc/files/lib/rio/if/path_rb.html +135 -0
  247. data/doc/rdoc/files/lib/rio/if/stream_rb.html +135 -0
  248. data/doc/rdoc/files/lib/rio/if/string_rb.html +135 -0
  249. data/doc/rdoc/files/lib/rio/if/temp_rb.html +135 -0
  250. data/doc/rdoc/files/lib/rio/if/test_rb.html +135 -0
  251. data/doc/rdoc/files/lib/rio/if/yaml_rb.html +135 -0
  252. data/doc/rdoc/files/lib/rio/kernel_rb.html +142 -0
  253. data/doc/rdoc/files/lib/rio_rb.html +154 -0
  254. data/doc/rdoc/fr_class_index.html +37 -0
  255. data/doc/rdoc/fr_file_index.html +49 -0
  256. data/doc/rdoc/fr_method_index.html +241 -0
  257. data/doc/rdoc/index.html +24 -0
  258. data/doc/rdoc/rdoc-style.css +384 -0
  259. data/lib/rio.rb +21 -5
  260. data/lib/rio/constructor.rb +13 -0
  261. data/lib/rio/context/copying.rb +56 -0
  262. data/lib/rio/context/methods.rb +1 -0
  263. data/lib/rio/cp.rb +53 -34
  264. data/lib/rio/doc/HOWTO.rb +9 -3
  265. data/lib/rio/doc/INTRO.rb +113 -3
  266. data/lib/rio/ext.rb +7 -1
  267. data/lib/rio/ext/csv.rb +17 -8
  268. data/lib/rio/ext/yaml.rb +182 -0
  269. data/lib/rio/factory.rb +11 -14
  270. data/lib/rio/filter/closeoneof.rb +12 -31
  271. data/lib/rio/filter/gzip.rb +7 -0
  272. data/lib/rio/if.rb +4 -1
  273. data/lib/rio/if/csv.rb +36 -35
  274. data/lib/rio/if/grande.rb +74 -5
  275. data/lib/rio/if/grande_stream.rb +11 -3
  276. data/lib/rio/if/path.rb +9 -8
  277. data/lib/rio/if/yaml.rb +218 -0
  278. data/lib/rio/ioh.rb +5 -3
  279. data/lib/rio/matchrecord.rb +9 -2
  280. data/lib/rio/ops/dir.rb +2 -1
  281. data/lib/rio/ops/either.rb +9 -9
  282. data/lib/rio/ops/file.rb +4 -1
  283. data/lib/rio/ops/path.rb +26 -20
  284. data/lib/rio/ops/stream.rb +1 -1
  285. data/lib/rio/ops/stream/input.rb +31 -9
  286. data/lib/rio/ops/stream/output.rb +7 -2
  287. data/lib/rio/ops/stream/read.rb +10 -10
  288. data/lib/rio/ops/stream/write.rb +10 -10
  289. data/lib/rio/path.rb +2 -2
  290. data/lib/rio/path/reset.rb +1 -1
  291. data/lib/rio/piper.rb +123 -0
  292. data/lib/rio/piper/cp.rb +81 -0
  293. data/lib/rio/rectype.rb +2 -2
  294. data/lib/rio/rl/base.rb +40 -17
  295. data/lib/rio/rl/builder.rb +8 -47
  296. data/lib/rio/rl/ioi.rb +3 -2
  297. data/lib/rio/rl/path.rb +101 -78
  298. data/lib/rio/rl/pathmethods.rb +95 -0
  299. data/lib/rio/rl/uri.rb +41 -51
  300. data/lib/rio/scheme/cmdio.rb +7 -1
  301. data/lib/rio/scheme/cmdpipe.rb +150 -0
  302. data/lib/rio/scheme/ftp.rb +0 -4
  303. data/lib/rio/scheme/http.rb +0 -2
  304. data/lib/rio/scheme/strio.rb +16 -0
  305. data/lib/rio/scheme/temp.rb +7 -7
  306. data/lib/rio/state.rb +23 -5
  307. data/lib/rio/stream.rb +4 -0
  308. data/lib/rio/stream/duplex.rb +1 -0
  309. data/lib/rio/stream/open.rb +8 -2
  310. data/lib/rio/version.rb +1 -1
  311. data/test/{runtests_gem.rb → gem_runtests.rb} +0 -0
  312. data/test/methods/path.rb +12 -0
  313. data/test/runtests.rb +2 -0
  314. data/test/tc/abs.rb +29 -27
  315. data/test/tc/all.rb +9 -3
  316. data/test/tc/base.rb +31 -0
  317. data/test/tc/cmdpipe.rb +146 -0
  318. data/test/tc/copydir.rb +2 -1
  319. data/test/tc/create.rb +10 -0
  320. data/test/tc/csv.rb +12 -12
  321. data/test/tc/csv2.rb +2 -2
  322. data/test/tc/csv_columns.rb +3 -3
  323. data/test/tc/each_break.rb +21 -8
  324. data/test/tc/expand_path.rb +21 -27
  325. data/test/tc/misc.rb +0 -1
  326. data/test/tc/noqae.rb +29 -21
  327. data/test/tc/overload.rb +14 -11
  328. data/test/tc/piper.rb +146 -0
  329. data/test/tc/riorl.rb +26 -17
  330. data/test/tc/route.rb +51 -0
  331. data/test/tc/skip.rb +8 -6
  332. data/test/tc/split.rb +70 -0
  333. data/test/tc/temp.rb +5 -5
  334. data/test/tc/testcase.rb +1 -0
  335. data/test/tc/yaml.rb +118 -0
  336. metadata +481 -229
  337. data/doc/README_MSWIN32.txt +0 -39
  338. data/ex/colx.rb +0 -8
  339. data/ex/findinruby +0 -23
  340. data/ex/findruby +0 -15
  341. data/ex/passwd_report.rb +0 -8
  342. data/ex/prompt.rb +0 -25
  343. data/ex/rgb.txt.gz +0 -0
  344. data/ex/riocat +0 -35
  345. data/ex/riogunzip +0 -31
  346. data/ex/riogzip +0 -24
  347. data/ex/rioprompt.rb +0 -6
  348. data/ex/tolf +0 -11
  349. data/test/mswin32.rb +0 -28
@@ -0,0 +1,114 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: RIO::IF</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td class="class-mod"><strong>Module</strong></td>
53
+ <td class="class-name-in-header">RIO::IF</td>
54
+ <td rowspan="2" class="class-header-space-col"></td>
55
+ <td rowspan="2">
56
+ <a class="in-url" href="../../files/lib/rio/if/csv_rb.html">
57
+ lib/rio/if/csv.rb
58
+ </a>
59
+ &nbsp;&nbsp;
60
+ <a class="in-url" href="../../files/lib/rio/if/yaml_rb.html">
61
+ lib/rio/if/yaml.rb
62
+ </a>
63
+ &nbsp;&nbsp;
64
+ </td>
65
+ </tr>
66
+
67
+ </table>
68
+ </div>
69
+ <!-- banner header -->
70
+
71
+ <div id="bodyContent">
72
+
73
+
74
+
75
+ <div id="contextContent">
76
+
77
+
78
+
79
+ </div>
80
+
81
+
82
+ </div>
83
+
84
+
85
+ <!-- if includes -->
86
+
87
+ <div id="section">
88
+
89
+ <div id="class-list">
90
+ <h3 class="section-bar">Classes and Modules</h3>
91
+
92
+ Module <a href="IF/CSV.html" class="link">RIO::IF::CSV</a><br />
93
+ Module <a href="IF/YAML.html" class="link">RIO::IF::YAML</a><br />
94
+
95
+ </div>
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+ <!-- if method_list -->
104
+
105
+
106
+ </div>
107
+
108
+
109
+ <div id="validator-badges">
110
+ <p><small>Copyright &copy; 2005 Christopher Kleckner. <a href="http://www.gnu.org/licenses/gpl.html">All rights reserved</a>.</small></p>
111
+ </div>
112
+
113
+ </body>
114
+ </html>
@@ -0,0 +1,202 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: RIO::IF::CSV</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td class="class-mod"><strong>Module</strong></td>
53
+ <td class="class-name-in-header">RIO::IF::CSV</td>
54
+ <td rowspan="2" class="class-header-space-col"></td>
55
+ <td rowspan="2">
56
+ <a class="in-url" href="../../../files/lib/rio/if/csv_rb.html">
57
+ lib/rio/if/csv.rb
58
+ </a>
59
+ &nbsp;&nbsp;
60
+ </td>
61
+ </tr>
62
+
63
+ </table>
64
+ </div>
65
+ <!-- banner header -->
66
+
67
+ <div id="bodyContent">
68
+
69
+
70
+
71
+ <div id="contextContent">
72
+
73
+
74
+
75
+ </div>
76
+
77
+ <div id="method-list">
78
+ <h3 class="section-bar">Methods</h3>
79
+
80
+ <div class="name-list">
81
+ <a href="#M000005">columns</a>&nbsp;&nbsp;
82
+ <a href="#M000004">csv</a>&nbsp;&nbsp;
83
+ <a href="#M000006">skipcolumns</a>&nbsp;&nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+ <div id="methods">
103
+ <h3 class="section-bar">Public Instance methods</h3>
104
+
105
+ <div id="method-M000005" class="method-detail">
106
+ <a name="M000005"></a>
107
+
108
+ <div class="method-heading">
109
+ <a href="CSV.src/M000005.html" target="Code" class="method-signature"
110
+ onclick="popupCode('CSV.src/M000005.html');return false;">
111
+ <span class="method-name">columns</span><span class="method-args">(*ranges,&amp;block)</span>
112
+ </a>
113
+ </div>
114
+
115
+ <div class="method-description">
116
+ <p>
117
+ Select columns from a <a href="CSV.html">CSV</a> file. See <a
118
+ href="CSV.html#M000004">csv</a> and <a
119
+ href="../Doc/INTRO.html">RIO::Doc::INTRO</a>.
120
+ </p>
121
+ </div>
122
+ </div>
123
+
124
+ <div id="method-M000004" class="method-detail">
125
+ <a name="M000004"></a>
126
+
127
+ <div class="method-heading">
128
+ <a href="CSV.src/M000004.html" target="Code" class="method-signature"
129
+ onclick="popupCode('CSV.src/M000004.html');return false;">
130
+ <span class="method-name">csv</span><span class="method-args">(field_separator=',',record_separator=nil,&amp;block)</span>
131
+ </a>
132
+ </div>
133
+
134
+ <div class="method-description">
135
+ <p>
136
+ Puts a <a href="../Rio.html">Rio</a> in <a href="CSV.html">CSV</a> mode and
137
+ sets the field and record separators. In csv mode selecting with <a
138
+ href="../Rio.html#M000082">Rio#records</a> will cause each line read to be
139
+ parsed into a line with the <a href="CSV.html">CSV</a> standard library.
140
+ Specifying using <a href="../Rio.html#M000080">Rio#lines</a> to select will
141
+ return unparsed strings as normal.
142
+ </p>
143
+ <pre>
144
+ # copy a csv file, changing the field separator
145
+ rio('afile.csv').csv &gt; rio('afile_semicolons.csv').csv(';')
146
+ </pre>
147
+ <p>
148
+ <a href="CSV.html">CSV</a> mode also adds two methods <a
149
+ href="CSV.html#M000005">columns</a> and <a
150
+ href="CSV.html#M000006">skipcolumns</a> which allows selecting columns by
151
+ column index using Fixnums or Ranges in a way similar to how lines are
152
+ selected.
153
+ </p>
154
+ <pre>
155
+ # iterate through every line but only get the first three columns
156
+ rio(&quot;afile.csv&quot;).csv.columns(0..2) { |array_of_fields| ... }
157
+
158
+ # iterate through every line but skip the columns 2 and 3 through 5
159
+ rio(&quot;afile.csv&quot;).csv.skipcolumns(2,3..5) { |array_of_fields| ... }
160
+
161
+ # an array containg all but the first line returning columns 5,6 and 7
162
+ rio(&quot;afile.csv&quot;).csv.columns(5..7).skiplines[0]
163
+ </pre>
164
+ <p>
165
+ See <a href="../Doc/INTRO.html">RIO::Doc::INTRO</a> for complete
166
+ documentation on csv mode.
167
+ </p>
168
+ </div>
169
+ </div>
170
+
171
+ <div id="method-M000006" class="method-detail">
172
+ <a name="M000006"></a>
173
+
174
+ <div class="method-heading">
175
+ <a href="CSV.src/M000006.html" target="Code" class="method-signature"
176
+ onclick="popupCode('CSV.src/M000006.html');return false;">
177
+ <span class="method-name">skipcolumns</span><span class="method-args">(*ranges,&amp;block)</span>
178
+ </a>
179
+ </div>
180
+
181
+ <div class="method-description">
182
+ <p>
183
+ Reject columns from a <a href="CSV.html">CSV</a> file. See <a
184
+ href="CSV.html#M000004">csv</a> and <a
185
+ href="../Doc/INTRO.html">RIO::Doc::INTRO</a>.
186
+ </p>
187
+ </div>
188
+ </div>
189
+
190
+
191
+ </div>
192
+
193
+
194
+ </div>
195
+
196
+
197
+ <div id="validator-badges">
198
+ <p><small>Copyright &copy; 2005 Christopher Kleckner. <a href="http://www.gnu.org/licenses/gpl.html">All rights reserved</a>.</small></p>
199
+ </div>
200
+
201
+ </body>
202
+ </html>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>csv (RIO::IF::CSV)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/rio/if/csv.rb, line 67</span>
14
+ 67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">csv</span>(<span class="ruby-identifier">field_separator</span>=<span class="ruby-value str">','</span>,<span class="ruby-identifier">record_separator</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 68: <span class="ruby-identifier">target</span>.<span class="ruby-identifier">csv</span>(<span class="ruby-identifier">field_separator</span>,<span class="ruby-identifier">record_separator</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>);
16
+ 69: <span class="ruby-keyword kw">self</span>
17
+ 70: <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>columns (RIO::IF::CSV)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/rio/if/csv.rb, line 72</span>
14
+ 72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">columns</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ranges</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">columns</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ranges</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
+ </body>
16
+ </html>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>skipcolumns (RIO::IF::CSV)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/rio/if/csv.rb, line 74</span>
14
+ 74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skipcolumns</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ranges</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">skipcolumns</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">ranges</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
+ </body>
16
+ </html>
@@ -0,0 +1,499 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: RIO::IF::YAML</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td class="class-mod"><strong>Module</strong></td>
53
+ <td class="class-name-in-header">RIO::IF::YAML</td>
54
+ <td rowspan="2" class="class-header-space-col"></td>
55
+ <td rowspan="2">
56
+ <a class="in-url" href="../../../files/lib/rio/if/yaml_rb.html">
57
+ lib/rio/if/yaml.rb
58
+ </a>
59
+ &nbsp;&nbsp;
60
+ </td>
61
+ </tr>
62
+
63
+ </table>
64
+ </div>
65
+ <!-- banner header -->
66
+
67
+ <div id="bodyContent">
68
+
69
+
70
+
71
+ <div id="contextContent">
72
+
73
+
74
+
75
+ </div>
76
+
77
+ <div id="method-list">
78
+ <h3 class="section-bar">Methods</h3>
79
+
80
+ <div class="name-list">
81
+ <a href="#M000011">documents</a>&nbsp;&nbsp;
82
+ <a href="#M000017">dump</a>&nbsp;&nbsp;
83
+ <a href="#M000013">getobj</a>&nbsp;&nbsp;
84
+ <a href="#M000014">load</a>&nbsp;&nbsp;
85
+ <a href="#M000009">objects</a>&nbsp;&nbsp;
86
+ <a href="#M000015">putobj</a>&nbsp;&nbsp;
87
+ <a href="#M000016">putobj!</a>&nbsp;&nbsp;
88
+ <a href="#M000012">skipdocuments</a>&nbsp;&nbsp;
89
+ <a href="#M000010">skipobjects</a>&nbsp;&nbsp;
90
+ <a href="#M000007">yaml</a>&nbsp;&nbsp;
91
+ <a href="#M000008">yaml?</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Instance methods</h3>
112
+
113
+ <div id="method-M000011" class="method-detail">
114
+ <a name="M000011"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="YAML.src/M000011.html" target="Code" class="method-signature"
118
+ onclick="popupCode('YAML.src/M000011.html');return false;">
119
+ <span class="method-name">documents</span><span class="method-args">(*selectors,&amp;block)</span>
120
+ </a>
121
+ </div>
122
+
123
+ <div class="method-description">
124
+ <p>
125
+ Select documents from a <a href="YAML.html">YAML</a> file. See <a
126
+ href="YAML.html#M000007">yaml</a> and <a
127
+ href="../Doc/INTRO.html">RIO::Doc::INTRO</a>
128
+ </p>
129
+ </div>
130
+ </div>
131
+
132
+ <div id="method-M000017" class="method-detail">
133
+ <a name="M000017"></a>
134
+
135
+ <div class="method-heading">
136
+ <a href="YAML.src/M000017.html" target="Code" class="method-signature"
137
+ onclick="popupCode('YAML.src/M000017.html');return false;">
138
+ <span class="method-name">dump</span><span class="method-args">(obj)</span>
139
+ </a>
140
+ </div>
141
+
142
+ <div class="method-description">
143
+ <p>
144
+ Alias for Rio#putobj!
145
+ </p>
146
+ </div>
147
+ </div>
148
+
149
+ <div id="method-M000013" class="method-detail">
150
+ <a name="M000013"></a>
151
+
152
+ <div class="method-heading">
153
+ <a href="YAML.src/M000013.html" target="Code" class="method-signature"
154
+ onclick="popupCode('YAML.src/M000013.html');return false;">
155
+ <span class="method-name">getobj</span><span class="method-args">()</span>
156
+ </a>
157
+ </div>
158
+
159
+ <div class="method-description">
160
+ <p>
161
+ Calls <a href="YAML.html#M000014">YAML.load</a>.
162
+ </p>
163
+ <p>
164
+ Loads a single <a href="YAML.html">YAML</a> object from the stream
165
+ referenced by the <a href="../Rio.html">Rio</a>
166
+ </p>
167
+ <pre>
168
+ rio('database.yml').yaml.getobj
169
+ </pre>
170
+ <p>
171
+ See <a href="YAML.html#M000007">yaml</a> and <a
172
+ href="../Doc/INTRO.html">RIO::Doc::INTRO</a>
173
+ </p>
174
+ </div>
175
+ </div>
176
+
177
+ <div id="method-M000014" class="method-detail">
178
+ <a name="M000014"></a>
179
+
180
+ <div class="method-heading">
181
+ <a href="YAML.src/M000014.html" target="Code" class="method-signature"
182
+ onclick="popupCode('YAML.src/M000014.html');return false;">
183
+ <span class="method-name">load</span><span class="method-args">()</span>
184
+ </a>
185
+ </div>
186
+
187
+ <div class="method-description">
188
+ <p>
189
+ Alias for <a href="YAML.html#M000013">getobj</a>
190
+ </p>
191
+ </div>
192
+ </div>
193
+
194
+ <div id="method-M000009" class="method-detail">
195
+ <a name="M000009"></a>
196
+
197
+ <div class="method-heading">
198
+ <a href="YAML.src/M000009.html" target="Code" class="method-signature"
199
+ onclick="popupCode('YAML.src/M000009.html');return false;">
200
+ <span class="method-name">objects</span><span class="method-args">(*selectors,&amp;block)</span>
201
+ </a>
202
+ </div>
203
+
204
+ <div class="method-description">
205
+ <p>
206
+ Select objects from a <a href="YAML.html">YAML</a> file. See <a
207
+ href="YAML.html#M000007">yaml</a> and <a
208
+ href="../Doc/INTRO.html">RIO::Doc::INTRO</a>
209
+ </p>
210
+ </div>
211
+ </div>
212
+
213
+ <div id="method-M000015" class="method-detail">
214
+ <a name="M000015"></a>
215
+
216
+ <div class="method-heading">
217
+ <a href="YAML.src/M000015.html" target="Code" class="method-signature"
218
+ onclick="popupCode('YAML.src/M000015.html');return false;">
219
+ <span class="method-name">putobj</span><span class="method-args">(obj)</span>
220
+ </a>
221
+ </div>
222
+
223
+ <div class="method-description">
224
+ <p>
225
+ Calls <a href="YAML.html#M000017">YAML.dump</a>, leaving the <a
226
+ href="../Rio.html">Rio</a> open.
227
+ </p>
228
+ </div>
229
+ </div>
230
+
231
+ <div id="method-M000016" class="method-detail">
232
+ <a name="M000016"></a>
233
+
234
+ <div class="method-heading">
235
+ <a href="YAML.src/M000016.html" target="Code" class="method-signature"
236
+ onclick="popupCode('YAML.src/M000016.html');return false;">
237
+ <span class="method-name">putobj!</span><span class="method-args">(obj)</span>
238
+ </a>
239
+ </div>
240
+
241
+ <div class="method-description">
242
+ <p>
243
+ Dumps an object to a <a href="../Rio.html">Rio</a> as with Rio#putobj, and
244
+ closes the <a href="../Rio.html">Rio</a>.
245
+ </p>
246
+ <pre>
247
+ rio('afile.yaml').yaml.putobj!(anobject)
248
+ </pre>
249
+ <p>
250
+ is identical to
251
+ </p>
252
+ <pre>
253
+ rio('afile.yaml').yaml.putobj(anobject).close
254
+ </pre>
255
+ </div>
256
+ </div>
257
+
258
+ <div id="method-M000012" class="method-detail">
259
+ <a name="M000012"></a>
260
+
261
+ <div class="method-heading">
262
+ <a href="YAML.src/M000012.html" target="Code" class="method-signature"
263
+ onclick="popupCode('YAML.src/M000012.html');return false;">
264
+ <span class="method-name">skipdocuments</span><span class="method-args">(*selectors,&amp;block)</span>
265
+ </a>
266
+ </div>
267
+
268
+ <div class="method-description">
269
+ <p>
270
+ Reject documents from a <a href="YAML.html">YAML</a> file. Calls skiprows.
271
+ See <a href="YAML.html#M000007">yaml</a> and <a
272
+ href="../Doc/INTRO.html">RIO::Doc::INTRO</a>
273
+ </p>
274
+ </div>
275
+ </div>
276
+
277
+ <div id="method-M000010" class="method-detail">
278
+ <a name="M000010"></a>
279
+
280
+ <div class="method-heading">
281
+ <a href="YAML.src/M000010.html" target="Code" class="method-signature"
282
+ onclick="popupCode('YAML.src/M000010.html');return false;">
283
+ <span class="method-name">skipobjects</span><span class="method-args">(*selectors,&amp;block)</span>
284
+ </a>
285
+ </div>
286
+
287
+ <div class="method-description">
288
+ <p>
289
+ Reject objects from a <a href="YAML.html">YAML</a> file. See <a
290
+ href="YAML.html#M000007">yaml</a> and <a
291
+ href="../Doc/INTRO.html">RIO::Doc::INTRO</a>
292
+ </p>
293
+ </div>
294
+ </div>
295
+
296
+ <div id="method-M000007" class="method-detail">
297
+ <a name="M000007"></a>
298
+
299
+ <div class="method-heading">
300
+ <a href="YAML.src/M000007.html" target="Code" class="method-signature"
301
+ onclick="popupCode('YAML.src/M000007.html');return false;">
302
+ <span class="method-name">yaml</span><span class="method-args">(&amp;block)</span>
303
+ </a>
304
+ </div>
305
+
306
+ <div class="method-description">
307
+ <p>
308
+ Puts a <a href="../Rio.html">Rio</a> in <a href="YAML.html">YAML</a> mode.
309
+ </p>
310
+ <p>
311
+ <a href="../Rio.html">Rio</a> uses the <a href="YAML.html">YAML</a> class
312
+ from the Ruby standard library to provide support for reading and writing
313
+ <a href="YAML.html">YAML</a> files. Normally using <tt>(skip)records</tt>
314
+ is identical to <tt>(skip)lines</tt> because while <tt>records</tt> only
315
+ selects and does not specify the record-type, <tt>lines</tt> is the
316
+ default.
317
+ </p>
318
+ <p>
319
+ The <a href="YAML.html">YAML</a> extension distingishes between items
320
+ selected using <a href="../Rio.html#M000082">Rio#records</a>, <a
321
+ href="../Rio.html#M000085">Rio#rows</a> and <a
322
+ href="../Rio.html#M000080">Rio#lines</a>. <a href="../Rio.html">Rio</a>
323
+ returns objects loaded via <a href="YAML.html#M000014">YAML#load</a> when
324
+ <tt>records</tt> is used; returns the <a href="YAML.html">YAML</a> text as
325
+ a String when <tt>rows</tt> is used; and returns lines as Strings as normal
326
+ when <tt>lines</tt> is used. <tt>records</tt> is the default. In yaml-mode,
327
+ <tt>(skip)records</tt> can be called as <tt>(skip)objects</tt> and
328
+ <tt>(skip)rows</tt> can be called as <tt>(skip)documents</tt>
329
+ </p>
330
+ <p>
331
+ To read a single <a href="YAML.html">YAML</a> document, <a
332
+ href="../Rio.html">Rio</a> provides <a href="YAML.html#M000013">getobj</a>
333
+ and <a href="YAML.html#M000014">load</a> For example, consider the
334
+ following partial &#8216;database.yml&#8217; from the rails distribution:
335
+ </p>
336
+ <pre>
337
+ development:
338
+ adapter: mysql
339
+ database: rails_development
340
+
341
+ test:
342
+ adapter: mysql
343
+ database: rails_test
344
+ </pre>
345
+ <p>
346
+ To get the object represented in the yaml file:
347
+ </p>
348
+ <pre>
349
+ rio('database.yml').yaml.load
350
+ ==&gt;{&quot;development&quot;=&gt;{&quot;adapter&quot;=&gt;&quot;mysql&quot;, &quot;database&quot;=&gt;&quot;rails_development&quot;},
351
+ &quot;test&quot;=&gt;{&quot;adapter&quot;=&gt;&quot;mysql&quot;, &quot;database&quot;=&gt;&quot;rails_test&quot;}}
352
+ </pre>
353
+ <p>
354
+ Or one could read parts of the file like so:
355
+ </p>
356
+ <pre>
357
+ rio('database.yml').yaml.getobj['development']['database']
358
+ ==&gt;&quot;rails_development&quot;
359
+ </pre>
360
+ <p>
361
+ Single objects can be written using <a href="YAML.html#M000015">putobj</a>
362
+ and <a href="YAML.html#M000016">putobj!</a> which is aliased to <a
363
+ href="YAML.html#M000017">dump</a>
364
+ </p>
365
+ <pre>
366
+ anobject = {
367
+ 'production' =&gt; {
368
+ 'adapter' =&gt; 'mysql',
369
+ 'database' =&gt; 'rails_production',
370
+ }
371
+ }
372
+ rio('afile.yaml').yaml.dump(anobject)
373
+ </pre>
374
+ <p>
375
+ The <a href="YAML.html">YAML</a> extension changes the way the grande copy
376
+ operators interpret their argument. <a href="../Rio.html">Rio</a>#&lt;
377
+ (copy-from) and <a href="../Rio.html">Rio</a>#&lt;&lt; (append-from) treat
378
+ an array as an array of objects which are converted using their to_yaml
379
+ method before writing.
380
+ </p>
381
+ <pre>
382
+ rio('afile.yaml').yaml &lt; [obj1, obj2, obj3]
383
+ </pre>
384
+ <p>
385
+ Because of this, copying an ::Array must be done like this:
386
+ </p>
387
+ <pre>
388
+ rio('afile.yaml').yaml &lt; [anarray]
389
+ </pre>
390
+ <p>
391
+ If their argument is a <a href="../Rio.html">Rio</a> or ::IO it is iterate
392
+ through as normal, with each record converted using its to_yaml method.
393
+ </p>
394
+ <p>
395
+ For all other objects, the result of their <tt>to_yaml</tt> operator is
396
+ simply written.
397
+ </p>
398
+ <pre>
399
+ rio('afile.yaml').yaml &lt; anobject
400
+ </pre>
401
+ <p>
402
+ <a href="../Rio.html">Rio</a>#&gt; (copy-to) and <a
403
+ href="../Rio.html">Rio</a>#&gt;&gt; (append-to) will fill an array with
404
+ with all selected <a href="YAML.html">YAML</a> documents in the <a
405
+ href="../Rio.html">Rio</a>. For non-arrays, the yaml text is copied. (This
406
+ may change if a useful reasonable alternative can be found)
407
+ rio(&#8216;afile.yaml&#8217;).yaml &gt; anarray # load all <a
408
+ href="YAML.html">YAML</a> documents from &#8216;afile.yaml&#8216;
409
+ </p>
410
+ <p>
411
+ Single objects can be written using <a
412
+ href="../Rio.html#M000068">Rio#putrec</a> (aliased to Rio#putobj and
413
+ Rio#dump)
414
+ </p>
415
+ <pre>
416
+ rio('afile.yaml').yaml.putobj(anobject)
417
+ </pre>
418
+ <p>
419
+ Single objects can be loaded using <a
420
+ href="../Rio.html#M000064">Rio#getrec</a> (aliase to Rio#getobj and
421
+ Rio#load)
422
+ </p>
423
+ <pre>
424
+ anobject = rio('afile.yaml').yaml.getobj
425
+ </pre>
426
+ <p>
427
+ Note that other than this redefinition of what a record is and how the copy
428
+ operators interpret their argument, a <a href="../Rio.html">Rio</a> in
429
+ yaml-mode is just like any other <a href="../Rio.html">Rio</a>. And all the
430
+ things you can do with any <a href="../Rio.html">Rio</a> come for free.
431
+ They can be iterated over using each and read into an array using #[] just
432
+ like any other <a href="../Rio.html">Rio</a>. All the selection criteria
433
+ are identical also.
434
+ </p>
435
+ <p>
436
+ Get the first three objects into an array:
437
+ </p>
438
+ <pre>
439
+ array_of_objects = rio('afile.yaml').yaml[0..2]
440
+ </pre>
441
+ <p>
442
+ Iterate over only <a href="YAML.html">YAML</a> documents that are a kind_of
443
+ ::Hash use:
444
+ </p>
445
+ <pre>
446
+ rio('afile.yaml').yaml(::Hash) {|ahash| ...}
447
+ </pre>
448
+ <p>
449
+ This takes advantage of the fact that the default for matching records is
450
+ <tt>===</tt>
451
+ </p>
452
+ <p>
453
+ Selecting records using a Proc can be used as normal:
454
+ </p>
455
+ <pre>
456
+ anarray = rio('afile.yaml').yaml(proc{|anobject| ...}).to_a
457
+ </pre>
458
+ <p>
459
+ One could even use the copy operator to convert a <a
460
+ href="CSV.html">CSV</a> file to a <a href="YAML.html">YAML</a>
461
+ representation of the same data:
462
+ </p>
463
+ <pre>
464
+ rio('afile.yaml').yaml &lt; rio('afile.csv').csv
465
+ </pre>
466
+ </div>
467
+ </div>
468
+
469
+ <div id="method-M000008" class="method-detail">
470
+ <a name="M000008"></a>
471
+
472
+ <div class="method-heading">
473
+ <a href="YAML.src/M000008.html" target="Code" class="method-signature"
474
+ onclick="popupCode('YAML.src/M000008.html');return false;">
475
+ <span class="method-name">yaml?</span><span class="method-args">()</span>
476
+ </a>
477
+ </div>
478
+
479
+ <div class="method-description">
480
+ <p>
481
+ Queries if the <a href="../Rio.html">Rio</a> is in yaml-mode. See <a
482
+ href="YAML.html#M000007">yaml</a>
483
+ </p>
484
+ </div>
485
+ </div>
486
+
487
+
488
+ </div>
489
+
490
+
491
+ </div>
492
+
493
+
494
+ <div id="validator-badges">
495
+ <p><small>Copyright &copy; 2005 Christopher Kleckner. <a href="http://www.gnu.org/licenses/gpl.html">All rights reserved</a>.</small></p>
496
+ </div>
497
+
498
+ </body>
499
+ </html>