rio 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. data/README +14 -8
  2. data/Rakefile +7 -9
  3. data/doc/ANNOUNCE +61 -46
  4. data/doc/RELEASE_NOTES +12 -3
  5. data/doc/RIOIS +7 -7
  6. data/doc/generators/template/html/rio.rb +7 -8
  7. data/doc/generators/template/html/ugly.rb +4 -2
  8. data/doc/pkg_def.rb +4 -10
  9. data/doc/rdoc/classes/Kernel.html +133 -0
  10. data/doc/rdoc/classes/Kernel.src/M000233.html +18 -0
  11. data/doc/rdoc/classes/RIO.html +625 -0
  12. data/doc/rdoc/classes/RIO.src/M000001.html +18 -0
  13. data/doc/rdoc/classes/RIO.src/M000002.html +18 -0
  14. data/doc/rdoc/classes/RIO.src/M000003.html +18 -0
  15. data/doc/rdoc/classes/RIO/Doc.html +148 -0
  16. data/doc/rdoc/classes/RIO/Doc/EXAMPLES.html +432 -0
  17. data/doc/rdoc/classes/RIO/Doc/HOWTO.html +1075 -0
  18. data/doc/rdoc/classes/RIO/Doc/INDEX.html +368 -0
  19. data/doc/rdoc/classes/RIO/Doc/INTRO.html +1533 -0
  20. data/doc/rdoc/classes/RIO/Doc/OPTIONAL.html +221 -0
  21. data/doc/rdoc/classes/RIO/Doc/SYNOPSIS.html +337 -0
  22. data/doc/rdoc/classes/RIO/IF.html +165 -0
  23. data/doc/rdoc/classes/RIO/IF/CSV.html +203 -0
  24. data/doc/rdoc/classes/RIO/IF/CSV.src/M000116.html +19 -0
  25. data/doc/rdoc/classes/RIO/IF/CSV.src/M000117.html +16 -0
  26. data/doc/rdoc/classes/RIO/IF/CSV.src/M000118.html +16 -0
  27. data/doc/rdoc/classes/RIO/IF/Dir.html +343 -0
  28. data/doc/rdoc/classes/RIO/IF/Dir.src/M000045.html +16 -0
  29. data/doc/rdoc/classes/RIO/IF/Dir.src/M000046.html +16 -0
  30. data/doc/rdoc/classes/RIO/IF/Dir.src/M000047.html +16 -0
  31. data/doc/rdoc/classes/RIO/IF/Dir.src/M000048.html +16 -0
  32. data/doc/rdoc/classes/RIO/IF/Dir.src/M000049.html +16 -0
  33. data/doc/rdoc/classes/RIO/IF/Dir.src/M000050.html +16 -0
  34. data/doc/rdoc/classes/RIO/IF/Dir.src/M000051.html +16 -0
  35. data/doc/rdoc/classes/RIO/IF/File.html +223 -0
  36. data/doc/rdoc/classes/RIO/IF/File.src/M000212.html +16 -0
  37. data/doc/rdoc/classes/RIO/IF/File.src/M000213.html +16 -0
  38. data/doc/rdoc/classes/RIO/IF/File.src/M000214.html +16 -0
  39. data/doc/rdoc/classes/RIO/IF/File.src/M000215.html +16 -0
  40. data/doc/rdoc/classes/RIO/IF/FileOrDir.html +572 -0
  41. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000155.html +16 -0
  42. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000156.html +16 -0
  43. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000157.html +16 -0
  44. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000158.html +16 -0
  45. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000159.html +16 -0
  46. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000160.html +16 -0
  47. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000161.html +16 -0
  48. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000162.html +16 -0
  49. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000163.html +16 -0
  50. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000164.html +16 -0
  51. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000165.html +16 -0
  52. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000166.html +16 -0
  53. data/doc/rdoc/classes/RIO/IF/Grande.html +1349 -0
  54. data/doc/rdoc/classes/RIO/IF/Grande.src/M000088.html +16 -0
  55. data/doc/rdoc/classes/RIO/IF/Grande.src/M000089.html +16 -0
  56. data/doc/rdoc/classes/RIO/IF/Grande.src/M000090.html +16 -0
  57. data/doc/rdoc/classes/RIO/IF/Grande.src/M000091.html +16 -0
  58. data/doc/rdoc/classes/RIO/IF/Grande.src/M000092.html +16 -0
  59. data/doc/rdoc/classes/RIO/IF/Grande.src/M000093.html +21 -0
  60. data/doc/rdoc/classes/RIO/IF/Grande.src/M000094.html +16 -0
  61. data/doc/rdoc/classes/RIO/IF/Grande.src/M000095.html +16 -0
  62. data/doc/rdoc/classes/RIO/IF/Grande.src/M000096.html +16 -0
  63. data/doc/rdoc/classes/RIO/IF/Grande.src/M000097.html +16 -0
  64. data/doc/rdoc/classes/RIO/IF/Grande.src/M000098.html +16 -0
  65. data/doc/rdoc/classes/RIO/IF/Grande.src/M000099.html +16 -0
  66. data/doc/rdoc/classes/RIO/IF/Grande.src/M000100.html +21 -0
  67. data/doc/rdoc/classes/RIO/IF/Grande.src/M000101.html +16 -0
  68. data/doc/rdoc/classes/RIO/IF/Grande.src/M000102.html +16 -0
  69. data/doc/rdoc/classes/RIO/IF/Grande.src/M000103.html +16 -0
  70. data/doc/rdoc/classes/RIO/IF/Grande.src/M000104.html +16 -0
  71. data/doc/rdoc/classes/RIO/IF/Grande.src/M000105.html +16 -0
  72. data/doc/rdoc/classes/RIO/IF/GrandeEntry.html +810 -0
  73. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000106.html +16 -0
  74. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000107.html +16 -0
  75. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000108.html +16 -0
  76. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000109.html +16 -0
  77. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000110.html +16 -0
  78. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000111.html +16 -0
  79. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000112.html +16 -0
  80. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000113.html +16 -0
  81. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000114.html +16 -0
  82. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000115.html +16 -0
  83. data/doc/rdoc/classes/RIO/IF/GrandeStream.html +1513 -0
  84. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000052.html +16 -0
  85. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000053.html +16 -0
  86. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000054.html +16 -0
  87. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000055.html +16 -0
  88. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000056.html +16 -0
  89. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000057.html +16 -0
  90. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000058.html +16 -0
  91. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000059.html +16 -0
  92. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000060.html +16 -0
  93. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000061.html +16 -0
  94. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000062.html +16 -0
  95. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000063.html +16 -0
  96. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000064.html +16 -0
  97. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000065.html +16 -0
  98. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000066.html +16 -0
  99. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000067.html +16 -0
  100. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000068.html +19 -0
  101. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000069.html +16 -0
  102. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000070.html +16 -0
  103. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000071.html +16 -0
  104. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000072.html +16 -0
  105. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000073.html +16 -0
  106. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000074.html +16 -0
  107. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000075.html +16 -0
  108. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000076.html +16 -0
  109. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000077.html +16 -0
  110. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000078.html +16 -0
  111. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000079.html +16 -0
  112. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000080.html +16 -0
  113. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000081.html +16 -0
  114. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000082.html +16 -0
  115. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000083.html +16 -0
  116. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000084.html +16 -0
  117. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000085.html +16 -0
  118. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000086.html +16 -0
  119. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000087.html +16 -0
  120. data/doc/rdoc/classes/RIO/IF/Path.html +999 -0
  121. data/doc/rdoc/classes/RIO/IF/Path.src/M000180.html +16 -0
  122. data/doc/rdoc/classes/RIO/IF/Path.src/M000181.html +16 -0
  123. data/doc/rdoc/classes/RIO/IF/Path.src/M000182.html +16 -0
  124. data/doc/rdoc/classes/RIO/IF/Path.src/M000183.html +16 -0
  125. data/doc/rdoc/classes/RIO/IF/Path.src/M000184.html +16 -0
  126. data/doc/rdoc/classes/RIO/IF/Path.src/M000185.html +16 -0
  127. data/doc/rdoc/classes/RIO/IF/Path.src/M000186.html +16 -0
  128. data/doc/rdoc/classes/RIO/IF/Path.src/M000187.html +16 -0
  129. data/doc/rdoc/classes/RIO/IF/Path.src/M000188.html +16 -0
  130. data/doc/rdoc/classes/RIO/IF/Path.src/M000189.html +16 -0
  131. data/doc/rdoc/classes/RIO/IF/Path.src/M000190.html +16 -0
  132. data/doc/rdoc/classes/RIO/IF/Path.src/M000191.html +16 -0
  133. data/doc/rdoc/classes/RIO/IF/Path.src/M000192.html +16 -0
  134. data/doc/rdoc/classes/RIO/IF/Path.src/M000193.html +16 -0
  135. data/doc/rdoc/classes/RIO/IF/Path.src/M000194.html +16 -0
  136. data/doc/rdoc/classes/RIO/IF/Path.src/M000195.html +16 -0
  137. data/doc/rdoc/classes/RIO/IF/Path.src/M000196.html +16 -0
  138. data/doc/rdoc/classes/RIO/IF/Path.src/M000197.html +16 -0
  139. data/doc/rdoc/classes/RIO/IF/Path.src/M000198.html +16 -0
  140. data/doc/rdoc/classes/RIO/IF/Path.src/M000199.html +16 -0
  141. data/doc/rdoc/classes/RIO/IF/Path.src/M000200.html +16 -0
  142. data/doc/rdoc/classes/RIO/IF/Path.src/M000201.html +16 -0
  143. data/doc/rdoc/classes/RIO/IF/Path.src/M000202.html +18 -0
  144. data/doc/rdoc/classes/RIO/IF/Path.src/M000203.html +16 -0
  145. data/doc/rdoc/classes/RIO/IF/Path.src/M000204.html +16 -0
  146. data/doc/rdoc/classes/RIO/IF/Path.src/M000205.html +16 -0
  147. data/doc/rdoc/classes/RIO/IF/Path.src/M000206.html +16 -0
  148. data/doc/rdoc/classes/RIO/IF/Path.src/M000207.html +16 -0
  149. data/doc/rdoc/classes/RIO/IF/Path.src/M000208.html +16 -0
  150. data/doc/rdoc/classes/RIO/IF/Path.src/M000209.html +16 -0
  151. data/doc/rdoc/classes/RIO/IF/Path.src/M000210.html +16 -0
  152. data/doc/rdoc/classes/RIO/IF/Path.src/M000211.html +16 -0
  153. data/doc/rdoc/classes/RIO/IF/RubyIO.html +1414 -0
  154. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000004.html +16 -0
  155. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000005.html +16 -0
  156. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000006.html +16 -0
  157. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000007.html +16 -0
  158. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000008.html +16 -0
  159. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000009.html +16 -0
  160. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000010.html +16 -0
  161. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000011.html +16 -0
  162. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000012.html +16 -0
  163. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000013.html +16 -0
  164. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000014.html +16 -0
  165. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000015.html +16 -0
  166. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000016.html +16 -0
  167. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000017.html +16 -0
  168. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000018.html +16 -0
  169. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000019.html +16 -0
  170. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000020.html +16 -0
  171. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000021.html +16 -0
  172. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000022.html +16 -0
  173. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000023.html +16 -0
  174. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000024.html +16 -0
  175. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000025.html +16 -0
  176. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000026.html +16 -0
  177. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000027.html +16 -0
  178. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000028.html +16 -0
  179. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000029.html +16 -0
  180. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000030.html +16 -0
  181. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000031.html +16 -0
  182. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000032.html +16 -0
  183. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000033.html +16 -0
  184. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000034.html +16 -0
  185. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000035.html +16 -0
  186. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000036.html +16 -0
  187. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000037.html +16 -0
  188. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000038.html +16 -0
  189. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000039.html +16 -0
  190. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000040.html +16 -0
  191. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000041.html +16 -0
  192. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000042.html +16 -0
  193. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000043.html +16 -0
  194. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000044.html +16 -0
  195. data/doc/rdoc/classes/RIO/IF/String.html +203 -0
  196. data/doc/rdoc/classes/RIO/IF/String.src/M000216.html +16 -0
  197. data/doc/rdoc/classes/RIO/IF/String.src/M000217.html +16 -0
  198. data/doc/rdoc/classes/RIO/IF/String.src/M000218.html +16 -0
  199. data/doc/rdoc/classes/RIO/IF/Test.html +990 -0
  200. data/doc/rdoc/classes/RIO/IF/Test.src/M000119.html +16 -0
  201. data/doc/rdoc/classes/RIO/IF/Test.src/M000120.html +16 -0
  202. data/doc/rdoc/classes/RIO/IF/Test.src/M000121.html +16 -0
  203. data/doc/rdoc/classes/RIO/IF/Test.src/M000122.html +16 -0
  204. data/doc/rdoc/classes/RIO/IF/Test.src/M000123.html +16 -0
  205. data/doc/rdoc/classes/RIO/IF/Test.src/M000124.html +16 -0
  206. data/doc/rdoc/classes/RIO/IF/Test.src/M000125.html +16 -0
  207. data/doc/rdoc/classes/RIO/IF/Test.src/M000126.html +16 -0
  208. data/doc/rdoc/classes/RIO/IF/Test.src/M000127.html +16 -0
  209. data/doc/rdoc/classes/RIO/IF/Test.src/M000128.html +16 -0
  210. data/doc/rdoc/classes/RIO/IF/Test.src/M000129.html +16 -0
  211. data/doc/rdoc/classes/RIO/IF/Test.src/M000130.html +16 -0
  212. data/doc/rdoc/classes/RIO/IF/Test.src/M000131.html +16 -0
  213. data/doc/rdoc/classes/RIO/IF/Test.src/M000132.html +16 -0
  214. data/doc/rdoc/classes/RIO/IF/Test.src/M000133.html +16 -0
  215. data/doc/rdoc/classes/RIO/IF/Test.src/M000134.html +16 -0
  216. data/doc/rdoc/classes/RIO/IF/Test.src/M000135.html +16 -0
  217. data/doc/rdoc/classes/RIO/IF/Test.src/M000136.html +16 -0
  218. data/doc/rdoc/classes/RIO/IF/Test.src/M000137.html +16 -0
  219. data/doc/rdoc/classes/RIO/IF/Test.src/M000138.html +16 -0
  220. data/doc/rdoc/classes/RIO/IF/Test.src/M000139.html +16 -0
  221. data/doc/rdoc/classes/RIO/IF/Test.src/M000140.html +16 -0
  222. data/doc/rdoc/classes/RIO/IF/Test.src/M000141.html +16 -0
  223. data/doc/rdoc/classes/RIO/IF/Test.src/M000142.html +16 -0
  224. data/doc/rdoc/classes/RIO/IF/Test.src/M000143.html +16 -0
  225. data/doc/rdoc/classes/RIO/IF/Test.src/M000144.html +16 -0
  226. data/doc/rdoc/classes/RIO/IF/Test.src/M000145.html +16 -0
  227. data/doc/rdoc/classes/RIO/IF/Test.src/M000146.html +16 -0
  228. data/doc/rdoc/classes/RIO/IF/Test.src/M000147.html +16 -0
  229. data/doc/rdoc/classes/RIO/IF/Test.src/M000148.html +16 -0
  230. data/doc/rdoc/classes/RIO/IF/Test.src/M000149.html +16 -0
  231. data/doc/rdoc/classes/RIO/IF/Test.src/M000150.html +16 -0
  232. data/doc/rdoc/classes/RIO/IF/Test.src/M000151.html +16 -0
  233. data/doc/rdoc/classes/RIO/IF/Test.src/M000152.html +16 -0
  234. data/doc/rdoc/classes/RIO/IF/Test.src/M000153.html +16 -0
  235. data/doc/rdoc/classes/RIO/IF/Test.src/M000154.html +16 -0
  236. data/doc/rdoc/classes/RIO/IF/YAML.html +517 -0
  237. data/doc/rdoc/classes/RIO/IF/YAML.src/M000167.html +19 -0
  238. data/doc/rdoc/classes/RIO/IF/YAML.src/M000168.html +16 -0
  239. data/doc/rdoc/classes/RIO/IF/YAML.src/M000169.html +16 -0
  240. data/doc/rdoc/classes/RIO/IF/YAML.src/M000170.html +16 -0
  241. data/doc/rdoc/classes/RIO/IF/YAML.src/M000171.html +16 -0
  242. data/doc/rdoc/classes/RIO/IF/YAML.src/M000172.html +16 -0
  243. data/doc/rdoc/classes/RIO/IF/YAML.src/M000173.html +16 -0
  244. data/doc/rdoc/classes/RIO/IF/YAML.src/M000174.html +16 -0
  245. data/doc/rdoc/classes/RIO/IF/YAML.src/M000175.html +16 -0
  246. data/doc/rdoc/classes/RIO/IF/YAML.src/M000176.html +16 -0
  247. data/doc/rdoc/classes/RIO/IF/YAML.src/M000177.html +16 -0
  248. data/doc/rdoc/classes/RIO/IF/YAML.src/M000178.html +16 -0
  249. data/doc/rdoc/classes/RIO/IF/YAML.src/M000179.html +16 -0
  250. data/doc/rdoc/classes/RIO/Rio.html +508 -0
  251. data/doc/rdoc/classes/RIO/Rio.src/M000219.html +18 -0
  252. data/doc/rdoc/classes/RIO/Rio.src/M000220.html +20 -0
  253. data/doc/rdoc/classes/RIO/Rio.src/M000221.html +27 -0
  254. data/doc/rdoc/classes/RIO/Rio.src/M000222.html +16 -0
  255. data/doc/rdoc/classes/RIO/Rio.src/M000224.html +19 -0
  256. data/doc/rdoc/classes/RIO/Rio.src/M000225.html +20 -0
  257. data/doc/rdoc/classes/RIO/Rio.src/M000226.html +16 -0
  258. data/doc/rdoc/classes/RIO/Rio.src/M000227.html +16 -0
  259. data/doc/rdoc/classes/RIO/Rio.src/M000228.html +16 -0
  260. data/doc/rdoc/classes/RIO/Rio.src/M000229.html +16 -0
  261. data/doc/rdoc/classes/RIO/Rio.src/M000230.html +16 -0
  262. data/doc/rdoc/classes/RIO/Rio.src/M000231.html +16 -0
  263. data/doc/rdoc/classes/RIO/Rio.src/M000232.html +16 -0
  264. data/doc/rdoc/created.rid +1 -0
  265. data/doc/rdoc/files/README.html +229 -0
  266. data/doc/rdoc/files/lib/rio/constructor_rb.html +141 -0
  267. data/doc/rdoc/files/lib/rio/doc/EXAMPLES_rb.html +134 -0
  268. data/doc/rdoc/files/lib/rio/doc/HOWTO_rb.html +134 -0
  269. data/doc/rdoc/files/lib/rio/doc/INDEX_rb.html +134 -0
  270. data/doc/rdoc/files/lib/rio/doc/INTRO_rb.html +134 -0
  271. data/doc/rdoc/files/lib/rio/doc/OPTIONAL_rb.html +134 -0
  272. data/doc/rdoc/files/lib/rio/doc/SYNOPSIS_rb.html +134 -0
  273. data/doc/rdoc/files/lib/rio/if/basic_rb.html +134 -0
  274. data/doc/rdoc/files/lib/rio/if/csv_rb.html +134 -0
  275. data/doc/rdoc/files/lib/rio/if/dir_rb.html +134 -0
  276. data/doc/rdoc/files/lib/rio/if/file_rb.html +134 -0
  277. data/doc/rdoc/files/lib/rio/if/fileordir_rb.html +134 -0
  278. data/doc/rdoc/files/lib/rio/if/grande_entry_rb.html +134 -0
  279. data/doc/rdoc/files/lib/rio/if/grande_rb.html +141 -0
  280. data/doc/rdoc/files/lib/rio/if/grande_stream_rb.html +134 -0
  281. data/doc/rdoc/files/lib/rio/if/internal_rb.html +134 -0
  282. data/doc/rdoc/files/lib/rio/if/path_rb.html +134 -0
  283. data/doc/rdoc/files/lib/rio/if/rubyio_rb.html +134 -0
  284. data/doc/rdoc/files/lib/rio/if/string_rb.html +134 -0
  285. data/doc/rdoc/files/lib/rio/if/temp_rb.html +134 -0
  286. data/doc/rdoc/files/lib/rio/if/test_rb.html +134 -0
  287. data/doc/rdoc/files/lib/rio/if/yaml_rb.html +134 -0
  288. data/doc/rdoc/files/lib/rio/kernel_rb.html +142 -0
  289. data/doc/rdoc/files/lib/rio_rb.html +153 -0
  290. data/doc/rdoc/fr_class_index.html +49 -0
  291. data/doc/rdoc/fr_file_index.html +51 -0
  292. data/doc/rdoc/fr_method_index.html +259 -0
  293. data/doc/rdoc/index.html +30 -0
  294. data/doc/rdoc/rdoc-style.css +428 -0
  295. data/lib/rio/cp.rb +9 -8
  296. data/lib/rio/doc/HOWTO.rb +46 -32
  297. data/lib/rio/doc/INDEX.rb +311 -0
  298. data/lib/rio/doc/INTRO.rb +10 -10
  299. data/lib/rio/doc/OPTIONAL.rb +6 -9
  300. data/lib/rio/doc/SYNOPSIS.rb +54 -57
  301. data/lib/rio/ext/csv.rb +5 -1
  302. data/lib/rio/ext/yaml.rb +19 -40
  303. data/lib/rio/if/fileordir.rb +1 -1
  304. data/lib/rio/if/grande.rb +4 -4
  305. data/lib/rio/if/grande_entry.rb +6 -0
  306. data/lib/rio/if/grande_stream.rb +10 -8
  307. data/lib/rio/if/path.rb +1 -1
  308. data/lib/rio/if/rubyio.rb +4 -4
  309. data/lib/rio/if/yaml.rb +27 -13
  310. data/lib/rio/ops/stream/input.rb +0 -1
  311. data/lib/rio/stream.rb +1 -0
  312. data/lib/rio/version.rb +1 -1
  313. data/test/tc/synopsis.rb +75 -0
  314. data/test/tc/yaml.rb +150 -4
  315. metadata +314 -2
@@ -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>open (RIO::IF::FileOrDir)</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/fileordir.rb, line 42</span>
14
+ 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-identifier">m</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">m</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</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>symlink (RIO::IF::FileOrDir)</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/fileordir.rb, line 75</span>
14
+ 75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symlink</span>(<span class="ruby-identifier">dest</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">symlink</span>(<span class="ruby-identifier">dest</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>readlink (RIO::IF::FileOrDir)</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/fileordir.rb, line 82</span>
14
+ 82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readlink</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">readlink</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</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>rename (RIO::IF::FileOrDir)</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/fileordir.rb, line 109</span>
14
+ 109: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rename</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">rename</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</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>rename! (RIO::IF::FileOrDir)</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/fileordir.rb, line 114</span>
14
+ 114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rename!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">rename!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</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>read (RIO::IF::FileOrDir)</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/fileordir.rb, line 141</span>
14
+ 141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">read</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</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>rewind (RIO::IF::FileOrDir)</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/fileordir.rb, line 167</span>
14
+ 167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rewind</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">rewind</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>seek (RIO::IF::FileOrDir)</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/fileordir.rb, line 199</span>
14
+ 199: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">seek</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">seek</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</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>pos (RIO::IF::FileOrDir)</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/fileordir.rb, line 227</span>
14
+ 227: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pos</span>() <span class="ruby-identifier">target</span>.<span class="ruby-identifier">pos</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>tell (RIO::IF::FileOrDir)</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/fileordir.rb, line 230</span>
14
+ 230: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tell</span>() <span class="ruby-identifier">target</span>.<span class="ruby-identifier">tell</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>pos= (RIO::IF::FileOrDir)</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/fileordir.rb, line 254</span>
14
+ 254: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pos=</span>(<span class="ruby-identifier">integer</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">pos</span> = <span class="ruby-identifier">integer</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>reopen (RIO::IF::FileOrDir)</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/fileordir.rb, line 259</span>
14
+ 259: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reopen</span>(<span class="ruby-identifier">mode</span>=<span class="ruby-keyword kw">nil</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">reopen</span>(<span class="ruby-identifier">mode</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
+ </body>
16
+ </html>
@@ -0,0 +1,1349 @@
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::Grande</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
+ <meta name="revisit-after" content="5 days">
12
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
13
+ <script type="text/javascript">
14
+ // <![CDATA[
15
+
16
+ function popupCode( url ) {
17
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
18
+ }
19
+
20
+ function toggleCode( id ) {
21
+ if ( document.getElementById )
22
+ elem = document.getElementById( id );
23
+ else if ( document.all )
24
+ elem = eval( "document.all." + id );
25
+ else
26
+ return false;
27
+
28
+ elemStyle = elem.style;
29
+
30
+ if ( elemStyle.display != "block" ) {
31
+ elemStyle.display = "block"
32
+ } else {
33
+ elemStyle.display = "none"
34
+ }
35
+
36
+ return true;
37
+ }
38
+
39
+ // Make codeblocks hidden by default
40
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
41
+
42
+ // ]]>
43
+ </script>
44
+
45
+ </head>
46
+ <body>
47
+
48
+
49
+
50
+ <div id="classHeader">
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td class="class-mod"><strong>Module</strong></td>
54
+ <td class="class-name-in-header">RIO::IF::Grande</td>
55
+ <td rowspan="2" class="class-header-space-col"></td>
56
+ <td rowspan="2">
57
+ <a class="in-url" href="../../../files/lib/rio/if/grande_rb.html">
58
+ lib/rio/if/grande.rb
59
+ </a>
60
+ &nbsp;&nbsp;
61
+ </td>
62
+ </tr>
63
+
64
+ </table>
65
+ </div>
66
+ <!-- banner header -->
67
+
68
+ <div id="bodyContent">
69
+
70
+
71
+
72
+ <div id="contextContent">
73
+
74
+
75
+
76
+ </div>
77
+
78
+ <div id="method-list">
79
+ <h3 class="section-bar">Methods</h3>
80
+
81
+ <div class="name-list">
82
+ <a href="#M000100">&lt;</a>&nbsp;&nbsp;
83
+ <a href="#M000098">&lt;&lt;</a>&nbsp;&nbsp;
84
+ <a href="#M000093">&gt;</a>&nbsp;&nbsp;
85
+ <a href="#M000096">&gt;&gt;</a>&nbsp;&nbsp;
86
+ <a href="#M000089">[]</a>&nbsp;&nbsp;
87
+ <a href="#M000099">append_from</a>&nbsp;&nbsp;
88
+ <a href="#M000097">append_to</a>&nbsp;&nbsp;
89
+ <a href="#M000101">copy_from</a>&nbsp;&nbsp;
90
+ <a href="#M000094">copy_to</a>&nbsp;&nbsp;
91
+ <a href="#M000091">delete</a>&nbsp;&nbsp;
92
+ <a href="#M000092">delete!</a>&nbsp;&nbsp;
93
+ <a href="#M000090">each</a>&nbsp;&nbsp;
94
+ <a href="#M000104">empty?</a>&nbsp;&nbsp;
95
+ <a href="#M000102">get</a>&nbsp;&nbsp;
96
+ <a href="#M000103">skip</a>&nbsp;&nbsp;
97
+ <a href="#M000105">split</a>&nbsp;&nbsp;
98
+ <a href="#M000088">to_a</a>&nbsp;&nbsp;
99
+ <a href="#M000095">|</a>&nbsp;&nbsp;
100
+ </div>
101
+ </div>
102
+
103
+
104
+
105
+ <!-- if includes -->
106
+
107
+ <div id="section">
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ <!-- if method_list -->
117
+ <div id="methods">
118
+ <h3 class="section-bar">Public Instance methods</h3>
119
+
120
+ <div id="method-M000100" class="method-detail">
121
+ <a name="M000100"></a>
122
+
123
+ <div class="method-heading">
124
+ <a href="Grande.src/M000100.html" target="Code" class="method-signature"
125
+ onclick="popupCode('Grande.src/M000100.html');return false;">
126
+ <span class="method-name">&lt;</span><span class="method-args">(source)</span>
127
+ </a>
128
+ </div>
129
+
130
+ <div class="method-description">
131
+ <p>
132
+ Grande Copy-From Operator
133
+ </p>
134
+ <p>
135
+ The copy-from grande-operator copies a Rio from another Rio or another ruby
136
+ object. Its operation is dependent on the the file system objects
137
+ referenced, the rio options set, and the state of its source and
138
+ destination. In the broadest of terms it could be described as doing the
139
+ following:
140
+ </p>
141
+ <pre>
142
+ source.each do |entry|
143
+ destination &lt;&lt; entry
144
+ end
145
+ </pre>
146
+ <p>
147
+ That is to say, it iterates through its argument, calling the copy-from
148
+ operator again for each element. While it is not implemented like this, and
149
+ the above code would not give the same results, This generalized
150
+ description is convenient. For example the code:
151
+ </p>
152
+ <pre>
153
+ dst &lt; src
154
+ # is like
155
+ src.each { |line| dst &lt;&lt; line }
156
+ </pre>
157
+ <p>
158
+ for any of the following definitions of src and dst
159
+ </p>
160
+ <ul>
161
+ <li>copying files
162
+
163
+ <pre>
164
+ src = rio('afile')
165
+ dst = rio('acopy')
166
+ </pre>
167
+ </li>
168
+ <li>copying parts of files
169
+
170
+ <pre>
171
+ src = rio('afile').lines(0..9)
172
+ dst = rio('acopy')
173
+ </pre>
174
+ </li>
175
+ <li>copying directories
176
+
177
+ <pre>
178
+ src = rio('srcdir')
179
+ dst = rio('dstdir')
180
+ </pre>
181
+ </li>
182
+ <li>copy directories selectively
183
+
184
+ <pre>
185
+ src = rio('srcdir').dirs(/^\./).files('*.tmp')
186
+ dst = rio('dstdir')
187
+ </pre>
188
+ </li>
189
+ <li>copying to a file from an array
190
+
191
+ <pre>
192
+ src = [&quot;line0\n&quot;,&quot;line1\n&quot;]
193
+ dst = rio('afile')
194
+ </pre>
195
+ </li>
196
+ <li>copying to a directory from an array
197
+
198
+ <pre>
199
+ array = [rio(&quot;file1&quot;),rio(&quot;file2&quot;)]
200
+ dst = rio('adir')
201
+ </pre>
202
+ </li>
203
+ </ul>
204
+ <p>
205
+ Arrays are handled differently depending on whether the rio references a
206
+ file or a directory.
207
+ </p>
208
+ <ul>
209
+ <li>If the destination is a file.
210
+
211
+ <pre>
212
+ dest = rio('afile')
213
+ dest &lt; array
214
+ # is roughly equivelent to
215
+ array.each do |el|
216
+ case el
217
+ when ::String then dest.print(el)
218
+ when ::Rio then dest &lt;&lt; el
219
+ else dest &lt;&lt; rio(el)
220
+ end
221
+ </pre>
222
+ </li>
223
+ <li>If the destination is a directory
224
+
225
+ <pre>
226
+ dest = rio('adir')
227
+ dest &lt; array
228
+ # is roughly equivelent to
229
+ array.each do |el|
230
+ case el
231
+ when ::String then rio(el)
232
+ when ::Rio then dest &lt;&lt; el
233
+ else dest &lt;&lt; rio(el)
234
+ end
235
+ </pre>
236
+ </li>
237
+ </ul>
238
+ <p>
239
+ To improve run-time efficiency, Rio will choose from among several
240
+ strategies when copying. For instance when no file or directory filtering
241
+ is specified, FileUtils#cp_r is used to copy directories; and when no line
242
+ filtering is specified, FileUtils#cp is used to copy files.
243
+ </p>
244
+ <pre>
245
+ rio('adir') &lt; rio('anotherdir') # 'anotherdir' is copied to 'adir' using FileUtils#cp_r
246
+ rio('adir') &lt; rio('anotherdir').files('*.rb') # copy only .rb files
247
+ rio('afile') &lt; rio('anotherfile') # 'anotherfile' is copied to 'afile' using FileUtils#cp
248
+ rio('afile') &lt; ios # ios must be an IO object opened for reading
249
+ rio('afile') &lt; astring # basically the same as rio('afile').print(astring)
250
+
251
+ anarray = [ astring, rio('anotherfile') ]
252
+ rio('afile') &lt; anarray # copies each element to 'afile' as if one had written
253
+ ario = rio('afile')
254
+ anarray.each do |el|
255
+ ario &lt;&lt; el
256
+ end
257
+ ario.close
258
+ rio('skeldir') &lt; rio('adir').dirs # copy only the directory structure
259
+ rio('destdir') &lt; rio('adir').dirs.files(/^\./) # copy the directory structure and all dot files
260
+ </pre>
261
+ <p>
262
+ See also <a href="Grande.html#M000093">></a> (copy-to), <a
263
+ href="Grande.html#M000090">each</a>, <a href="Grande.html#M000089">[]</a>
264
+ </p>
265
+ </div>
266
+ </div>
267
+
268
+ <div id="method-M000098" class="method-detail">
269
+ <a name="M000098"></a>
270
+
271
+ <div class="method-heading">
272
+ <a href="Grande.src/M000098.html" target="Code" class="method-signature"
273
+ onclick="popupCode('Grande.src/M000098.html');return false;">
274
+ <span class="method-name">&lt;&lt;</span><span class="method-args">(source)</span>
275
+ </a>
276
+ </div>
277
+
278
+ <div class="method-description">
279
+ <p>
280
+ Grande Append-From Operator
281
+ </p>
282
+ <p>
283
+ The append-from grande-operator copies a Rio from another Rio or another
284
+ ruby object. This behaves like <a href="Grande.html#M000100"><</a>
285
+ (copy-from) except unopened Rios are opened for append.
286
+ </p>
287
+ <p>
288
+ The following summarizes how objects are copied:
289
+ </p>
290
+ <table>
291
+ <tr><td valign="top">IO:</td><td>IO#each is used to iterate through the source with each record appended to
292
+ the Rio
293
+
294
+ </td></tr>
295
+ <tr><td valign="top">Array:</td><td>Each element of the Array is appended individually to the Rio.
296
+
297
+ </td></tr>
298
+ <tr><td valign="top">String:</td><td>The string is appended to the Rio using <a
299
+ href="RubyIO.html#M000015">print</a>
300
+
301
+ </td></tr>
302
+ <tr><td valign="top">Rio:</td><td>The source Rio is appended using its <a href="Grande.html#M000096">>></a>
303
+ (append-to) operator
304
+
305
+ </td></tr>
306
+ </table>
307
+ <p>
308
+ See <a href="Grande.html#M000100"><</a> (copy-from)
309
+ </p>
310
+ </div>
311
+ </div>
312
+
313
+ <div id="method-M000093" class="method-detail">
314
+ <a name="M000093"></a>
315
+
316
+ <div class="method-heading">
317
+ <a href="Grande.src/M000093.html" target="Code" class="method-signature"
318
+ onclick="popupCode('Grande.src/M000093.html');return false;">
319
+ <span class="method-name">&gt;</span><span class="method-args">(destination)</span>
320
+ </a>
321
+ </div>
322
+
323
+ <div class="method-description">
324
+ <p>
325
+ Grande Copy-To Operator
326
+ </p>
327
+ <p>
328
+ The copy grande-operator copies a Rio to a another Rio or another ruby
329
+ object. The behaviour and the library used depend on the types of the of
330
+ the source and destination. For simple file or directory copying
331
+ ::FileUtils#cp or ::FileUtils#cp_r will be used. If any of the Rio grande
332
+ methods are specified for the source or destination, the source Rio will be
333
+ iterated through copying records to the destintion as specified. Roughly
334
+ equivelant to
335
+ </p>
336
+ <pre>
337
+ dst = rio('dst_file')
338
+ rio('src_file').each do |line|
339
+ dst.print(line)
340
+ end
341
+ dst.close
342
+ </pre>
343
+ <p>
344
+ The destination of the copy operators may be a:
345
+ </p>
346
+ <table>
347
+ <tr><td valign="top">IO:</td><td>Each record of the Rio is written to the IO using IO#print. The IO must be
348
+ opened for writing.
349
+
350
+ </td></tr>
351
+ <tr><td valign="top">Array:</td><td>Each record or entry of the Rio becomes an element of the array
352
+
353
+ </td></tr>
354
+ <tr><td valign="top">String:</td><td>Puts the entire contents of the Rio into the string
355
+
356
+ </td></tr>
357
+ <tr><td valign="top">Rio:</td><td>Depends on the destination. See below.
358
+
359
+ </td></tr>
360
+ </table>
361
+ <p>
362
+ Copy a file to a file
363
+ </p>
364
+ <pre>
365
+ rio('src_file') &gt; rio('dst_file')
366
+ </pre>
367
+ <p>
368
+ Copy a file to a directory
369
+ </p>
370
+ <pre>
371
+ rio('src_file') &gt; rio('dst_dir')
372
+ </pre>
373
+ <p>
374
+ Copy a directory to another directory
375
+ </p>
376
+ <pre>
377
+ rio('src_dir') &gt; rio('dst_dir')
378
+ </pre>
379
+ <p>
380
+ Make an ungizipped copy of a gzipped file
381
+ </p>
382
+ <pre>
383
+ rio('src.txt.gz').gzip &gt; rio('dst.txt')
384
+ </pre>
385
+ <p>
386
+ Copying to an array
387
+ </p>
388
+ <pre>
389
+ rio('afile') &gt; ary # each line of the file becomes and element of the ary
390
+ rio('afile').chomp &gt; ary # same thing with lines chomped
391
+ rio('afile.gz').gzip.chomp &gt; ary # same thing from a gzipped file
392
+
393
+ rio('afile').lines(0..9) &gt; ary # ary will contain only the first ten lines of the file
394
+ rio('afile').chomp.lines(0..9) &gt; ary # same thing with lines chomped
395
+ rio('afile').gzip.chomp.lines(0..9) &gt; ary # same thing from a gzipped file
396
+
397
+ rio('afile').skiplines(0..9) &gt; ary # ary will contain all but the first ten lines of the file
398
+
399
+ rio('adir') &gt; ary # ary will contain a Rio for each entry in the directory
400
+ rio('adir').files &gt; ary # same, but only files
401
+ rio('adir').files('*.rb') &gt;ary # same, but only .rb files
402
+ </pre>
403
+ <p>
404
+ Copying to a string
405
+ </p>
406
+ <pre>
407
+ rio('afile') &gt; astring # slurp the entire contents of the file into astring
408
+ astring = rio('afile').contents # same effect
409
+ </pre>
410
+ <p>
411
+ Copy the first line <b>and</b> every line containing the word Rio into a
412
+ gzipped file
413
+ </p>
414
+ <pre>
415
+ rio('src').lines(1,/Rio/) &gt; rio('dst.gz').gzip
416
+ </pre>
417
+ <p>
418
+ Copy lines of a web page into an array with each line chomped
419
+ </p>
420
+ <pre>
421
+ rio('http://ruby-doc.org/index.html').chomp &gt; an_array
422
+ </pre>
423
+ <p>
424
+ Copy the first and 8th through 10th columns of the first ten rows of a
425
+ gzipped csv file on a web site into a local gzipped csv file that uses
426
+ semi-colons as separators
427
+ </p>
428
+ <pre>
429
+ rio('http://domain/file.csv.gz').columns(0,7..9).gzip.csv[0..9] &gt; rio('localfile.csv.gz').csv(';').gzip
430
+ </pre>
431
+ <p>
432
+ See also <a href="Grande.html#M000096">>></a>, <a
433
+ href="Grande.html#M000095">|</a>
434
+ </p>
435
+ </div>
436
+ </div>
437
+
438
+ <div id="method-M000096" class="method-detail">
439
+ <a name="M000096"></a>
440
+
441
+ <div class="method-heading">
442
+ <a href="Grande.src/M000096.html" target="Code" class="method-signature"
443
+ onclick="popupCode('Grande.src/M000096.html');return false;">
444
+ <span class="method-name">&gt;&gt;</span><span class="method-args">(destination)</span>
445
+ </a>
446
+ </div>
447
+
448
+ <div class="method-description">
449
+ <p>
450
+ Grande Append-To Operator
451
+ </p>
452
+ <p>
453
+ The append-to grande-operator is the same as <a
454
+ href="Grande.html#M000093">></a> (copy-to) except that it opens the
455
+ destination for append. The destination can be a kind of:
456
+ </p>
457
+ <table>
458
+ <tr><td valign="top">IO:</td><td>Each record of the Rio is written to the IO using IO#print. The IO must be
459
+ opened for writing.
460
+
461
+ </td></tr>
462
+ <tr><td valign="top">Array:</td><td>Each record or entry of the Rio is appended to the destination array
463
+
464
+ </td></tr>
465
+ <tr><td valign="top">String:</td><td>Appends the entire contents of the Rio to destination
466
+
467
+ </td></tr>
468
+ <tr><td valign="top">Rio:</td><td>Just like <a href="Grande.html#M000093">></a> (copy-to) except the unopened
469
+ object are opened for append. If the destination is already opened for
470
+ writing or is a directory, this is identical to <a
471
+ href="Grande.html#M000093">></a> (copy-to)
472
+
473
+ </td></tr>
474
+ </table>
475
+ <p>
476
+ See <a href="Grande.html#M000093">></a> (copy-to)
477
+ </p>
478
+ <pre>
479
+ rio('afile') &gt;&gt; rio('anotherfile') # append the contents of 'afile' to 'anotherfile'
480
+ rio('afile') &gt;&gt; rio('adir') # copies 'afile' to the directory 'adir'
481
+ rio('adir') &gt;&gt; rio('anotherdir') # copy directory 'adir' recursively to 'anotherdir'
482
+ rio('adir') &gt;&gt; array # a Rio for each entry in the directory will be appended to ary
483
+ </pre>
484
+ </div>
485
+ </div>
486
+
487
+ <div id="method-M000089" class="method-detail">
488
+ <a name="M000089"></a>
489
+
490
+ <div class="method-heading">
491
+ <a href="Grande.src/M000089.html" target="Code" class="method-signature"
492
+ onclick="popupCode('Grande.src/M000089.html');return false;">
493
+ <span class="method-name">[]</span><span class="method-args">(*selectors)</span>
494
+ </a>
495
+ </div>
496
+
497
+ <div class="method-description">
498
+ <p>
499
+ Grande subscript operator.
500
+ </p>
501
+ <p>
502
+ For files this returns all or part of a file as an array.
503
+ </p>
504
+ <p>
505
+ For directories this returns all or some of the entries in a directory
506
+ </p>
507
+ <h3>Files</h3>
508
+ <p>
509
+ This combines the record selection offered by <a
510
+ href="GrandeStream.html#M000057">records</a> with the conversion to an
511
+ array provided by <a href="Grande.html#M000088">to_a</a>. The following two
512
+ are equivelant:
513
+ </p>
514
+ <pre>
515
+ ario[*args]
516
+ ario.records(*args).to_a
517
+ </pre>
518
+ <p>
519
+ What constitutes an array element is determined by <a
520
+ href="GrandeStream.html#M000055">lines</a>, <a
521
+ href="GrandeStream.html#M000056">bytes</a>, or by an extension such as <a
522
+ href="CSV.html#M000116">csv</a>. <a
523
+ href="GrandeStream.html#M000055">lines</a> is the default.
524
+ </p>
525
+ <p>
526
+ Arguments may consist of zero or more integers, ranges, regular
527
+ expressions, symbols, procs, and arrays An empty argument list selects all
528
+ records
529
+ </p>
530
+ <p>
531
+ Records are selected as follows.
532
+ </p>
533
+ <table>
534
+ <tr><td valign="top">range:</td><td>specifies a range of records to be selected (zero based)
535
+
536
+ </td></tr>
537
+ <tr><td valign="top">regexp:</td><td>matching records will be selected.
538
+
539
+ </td></tr>
540
+ <tr><td valign="top">integer:</td><td>treated like a one element range
541
+
542
+ </td></tr>
543
+ <tr><td valign="top">symbol:</td><td>the symbol is sent to each record. Record is selected unless false is
544
+ returned
545
+
546
+ </td></tr>
547
+ <tr><td valign="top">proc:</td><td>the proc is called with the record as an argument. Record is selected
548
+ unless false is returned
549
+
550
+ </td></tr>
551
+ <tr><td valign="top">array:</td><td>the array may contain any of the other selector types. Record is selected
552
+ unless any of the selectors returns false. (a logical and)
553
+
554
+ </td></tr>
555
+ </table>
556
+ <p>
557
+ A record matching <b>any</b> of the selectors will be included in the
558
+ array. (acts like an <em>or</em>)
559
+ </p>
560
+ <p>
561
+ Because this is implemented in terms of the <a
562
+ href="Grande.html#M000090">each</a>, When only record ranges are used to
563
+ select records, iteration will stop when the recno exceeds the maximum of
564
+ any range. That is to say
565
+ </p>
566
+ <p>
567
+ This reads one record from a file and returns it
568
+ </p>
569
+ <pre>
570
+ rio('bigfile.mp3').bytes(1024)[0]
571
+ </pre>
572
+ <p>
573
+ While this reads <b>all</b> records from a file and returns the first one
574
+ </p>
575
+ <pre>
576
+ rio('bigfile.mp3').bytes(1024).to_a[0]
577
+ </pre>
578
+ <h3>Directories</h3>
579
+ <p>
580
+ This combines the entry selection offered by <a
581
+ href="GrandeEntry.html#M000108">entries</a> with the conversion to an array
582
+ provided by <a href="Grande.html#M000088">to_a</a>. The following two are
583
+ equivelant:
584
+ </p>
585
+ <pre>
586
+ ario[*args]
587
+ ario.entries(*args).to_a
588
+ </pre>
589
+ <p>
590
+ Arguments may consist of strings (treated as globs) or regular expressions.
591
+ An empty argument list selects all entries See ::Dir#glob and
592
+ ::File::fnmatch? for more in information on <em>globs</em>. Be warned that
593
+ using the &#8217;**&#8217; glob recurses into directories independently of
594
+ <a href="GrandeEntry.html#M000113">all</a> and using both is unsupported.
595
+ </p>
596
+ <pre>
597
+ ario = rio('adir')
598
+ ario[] # returns an array containg all entries in _adir_
599
+ ario[/^zippy/] # all entries starting with 'zippy'
600
+ ario['zippy*'] # same thing
601
+ </pre>
602
+ <p>
603
+ As with <a href="Grande.html#M000090">each</a>:
604
+ </p>
605
+ <ul>
606
+ <li>Files and directories are returned as Rios
607
+
608
+ </li>
609
+ <li>The types of entries is also affected by <a
610
+ href="GrandeEntry.html#M000110">files</a> and <a
611
+ href="GrandeEntry.html#M000106">dirs</a>.
612
+
613
+ <pre>
614
+ rio('adir').files['*.txt'] # array of all .txt files
615
+ rio('adir').dirs(/^\./) # array of all dot directories
616
+ </pre>
617
+ </li>
618
+ <li>Recursion is enabled using <a href="GrandeEntry.html#M000113">all</a>
619
+
620
+ <pre>
621
+ rio('adir').all.files['*.[ch]'] # array of c source files in adir and its subdirecories
622
+ rio('adir').all.dirs[/^\.svn/] # array of subversion directories in adir and subdirectories
623
+ </pre>
624
+ </li>
625
+ <li><a href="GrandeEntry.html#M000110">files</a> and <a
626
+ href="GrandeEntry.html#M000106">dirs</a> act independetly of each other.
627
+ Specifying both will cause both to be returned. The argument list to <a
628
+ href="Grande.html#M000089">[]</a> will be applied to the closest.
629
+
630
+ <pre>
631
+ rio('adir').files('*.rb').dirs['ruby*'] # array of .rb files and
632
+ # directories starting with 'ruby'
633
+ rio('adir').dirs('ruby*').files['*.rb'] # same thing
634
+ </pre>
635
+ </li>
636
+ </ul>
637
+ <h3>Lines</h3>
638
+ <p>
639
+ This section applies similarly to <a
640
+ href="GrandeStream.html#M000055">lines</a>, <a
641
+ href="GrandeStream.html#M000056">bytes</a>, <a
642
+ href="GrandeStream.html#M000057">records</a>, and <a
643
+ href="GrandeStream.html#M000060">rows</a>
644
+ </p>
645
+ <p>
646
+ Using <a href="GrandeStream.html#M000055">lines</a> and related methods
647
+ with a Rio referencing a directory imples <a
648
+ href="GrandeEntry.html#M000110">files</a> and will cause an array of the
649
+ lines or bytes in the files to be returned. As above, the arguments to the
650
+ subscript operator will be applied to the closest.
651
+ </p>
652
+ <pre>
653
+ rio('adir').lines[] # array of all lines in the files in 'adir'
654
+ rio('adir').files.lines[] # same thing
655
+ rio('adir').lines(0..9).files['*.txt'] # array of the first ten lines of all .txt files
656
+ rio('adir').files('*.txt').lines[0..9] # same thing
657
+ rio('adir').all.files('*.rb').lines[/^\s*require/] # array of 'require' lines in .rb files in
658
+ # 'adir and its subdirectories
659
+ </pre>
660
+ <p>
661
+ Note the difference between the following similar usages
662
+ </p>
663
+ <pre>
664
+ it1 = rio('adir').files('*.rb') # returns a Rio, prepared for selecting ruby files
665
+ it2 = rio('adir').files['*.rb'] # returns an array of the ruby files
666
+ </pre>
667
+ <p>
668
+ The second example above could have been written
669
+ </p>
670
+ <pre>
671
+ it2 = it1.to_a
672
+ </pre>
673
+ <p>
674
+ Examples:
675
+ </p>
676
+ <pre>
677
+ rio('afile.txt').lines[1..2] # array containing the 2nd and 3rd line
678
+
679
+ rio('afile.txt')[1,3..5] # array containing lines 1,3,4 and 5
680
+
681
+ rio('afile.txt')[/Zippy/] # array of all lines containing 'Zippy'
682
+
683
+ rio('afile.txt')[1,3..5,/Zippy/] # array with lines 1,3,4 and 5 and all lines containing 'Zippy'
684
+
685
+ rio('afile.dat').bytes(50)[] # array containing the contents of afile.dat broken up into 50 byte chunks
686
+
687
+ rio('afile.dat').bytes(50)[0,2] # array containing the first and third such chunk
688
+
689
+ rio('afile.dat').bytes(50).records[0,2] # same thing
690
+
691
+ rio('afile.dat').bytes(50).records(0,2).to_a # once again
692
+
693
+ rio('afile.csv').csv[0..9] # array of the first 10 records of afile.csv parsed by the ::CSV module
694
+
695
+ rio('afile.csv').csv.records[0..9] # same thing
696
+
697
+ rio('afile.csv').csv(';').records[0..9] # same thing using semi-colon as the value separator
698
+
699
+ rio('afile.csv').csv.records[0,/Zippy/] # record 0 and all records containing 'Zippy'
700
+ # the regexp is matched against the line before parsing by ::CSV
701
+
702
+ rio('adir')[] # array of entries in 'adir'
703
+
704
+ rio('adir')['*.txt'] # array of all .txt entries
705
+
706
+ rio('adir').all['*.txt'] # array of all .txt entries in 'adir and its subdirectories
707
+
708
+ rio('adir').files['*.txt'] # array of all .txt files
709
+
710
+ rio('adir').dirs['CSV'] # array of all CSV directories
711
+ rio('adir').skipdirs['CSV'] # array of all non-CSV directories
712
+ </pre>
713
+ </div>
714
+ </div>
715
+
716
+ <div id="method-M000099" class="method-detail">
717
+ <a name="M000099"></a>
718
+
719
+ <div class="method-heading">
720
+ <a href="Grande.src/M000099.html" target="Code" class="method-signature"
721
+ onclick="popupCode('Grande.src/M000099.html');return false;">
722
+ <span class="method-name">append_from</span><span class="method-args">(source)</span>
723
+ </a>
724
+ </div>
725
+
726
+ <div class="method-description">
727
+ <p>
728
+ Alias for <a href="Grande.html#M000098"><<</a> (append-from grande
729
+ operator)
730
+ </p>
731
+ </div>
732
+ </div>
733
+
734
+ <div id="method-M000097" class="method-detail">
735
+ <a name="M000097"></a>
736
+
737
+ <div class="method-heading">
738
+ <a href="Grande.src/M000097.html" target="Code" class="method-signature"
739
+ onclick="popupCode('Grande.src/M000097.html');return false;">
740
+ <span class="method-name">append_to</span><span class="method-args">(destination)</span>
741
+ </a>
742
+ </div>
743
+
744
+ <div class="method-description">
745
+ <p>
746
+ Alias for <a href="Grande.html#M000096">>></a> (append-to grande operator)
747
+ </p>
748
+ </div>
749
+ </div>
750
+
751
+ <div id="method-M000101" class="method-detail">
752
+ <a name="M000101"></a>
753
+
754
+ <div class="method-heading">
755
+ <a href="Grande.src/M000101.html" target="Code" class="method-signature"
756
+ onclick="popupCode('Grande.src/M000101.html');return false;">
757
+ <span class="method-name">copy_from</span><span class="method-args">(source)</span>
758
+ </a>
759
+ </div>
760
+
761
+ <div class="method-description">
762
+ <p>
763
+ Alias for <a href="Grande.html#M000100"><</a> (copy-from grande operator)
764
+ </p>
765
+ </div>
766
+ </div>
767
+
768
+ <div id="method-M000094" class="method-detail">
769
+ <a name="M000094"></a>
770
+
771
+ <div class="method-heading">
772
+ <a href="Grande.src/M000094.html" target="Code" class="method-signature"
773
+ onclick="popupCode('Grande.src/M000094.html');return false;">
774
+ <span class="method-name">copy_to</span><span class="method-args">(destination)</span>
775
+ </a>
776
+ </div>
777
+
778
+ <div class="method-description">
779
+ <p>
780
+ Alias for <a href="Grande.html#M000093">></a> (copy-to grande operator)
781
+ </p>
782
+ </div>
783
+ </div>
784
+
785
+ <div id="method-M000091" class="method-detail">
786
+ <a name="M000091"></a>
787
+
788
+ <div class="method-heading">
789
+ <a href="Grande.src/M000091.html" target="Code" class="method-signature"
790
+ onclick="popupCode('Grande.src/M000091.html');return false;">
791
+ <span class="method-name">delete</span><span class="method-args">()</span>
792
+ </a>
793
+ </div>
794
+
795
+ <div class="method-description">
796
+ <p>
797
+ For a file Rio <tt>delete</tt> calls FileUtils#rm. For a directory Rio
798
+ <tt>delete</tt> calls FileUtils#rmdir Returns the Rio. If the Rio does not
799
+ exist, simply return the Rio.
800
+ </p>
801
+ <pre>
802
+ rio('afile,txt').delete # delete 'afile.txt'
803
+ rio('adir').delete # delete adir
804
+ rio('something').delete # delete something
805
+ </pre>
806
+ </div>
807
+ </div>
808
+
809
+ <div id="method-M000092" class="method-detail">
810
+ <a name="M000092"></a>
811
+
812
+ <div class="method-heading">
813
+ <a href="Grande.src/M000092.html" target="Code" class="method-signature"
814
+ onclick="popupCode('Grande.src/M000092.html');return false;">
815
+ <span class="method-name">delete!</span><span class="method-args">()</span>
816
+ </a>
817
+ </div>
818
+
819
+ <div class="method-description">
820
+ <p>
821
+ For a file <a href="Grande.html#M000092">delete!</a> calls FileUtils#rm.
822
+ For a directory <a href="Grande.html#M000092">delete!</a> calls
823
+ FileUtils#rmtree Returns the Rio. If the rio does not exist, simply return
824
+ itself.
825
+ </p>
826
+ <pre>
827
+ rio('afile,txt').delete! # delete f.txt
828
+ rio('adir').delete! # delete adir
829
+
830
+ # create a directory, after deleting anything that previously had its name
831
+ rio('adir/asubdir').delete!.mkpath
832
+ </pre>
833
+ <h4>Deleting Summary</h4>
834
+ <ul>
835
+ <li>To delete something only if it is not a directory use <a
836
+ href="File.html#M000212">rm</a>
837
+
838
+ </li>
839
+ <li>To delete an empty directory use <a href="Dir.html#M000048">rmdir</a>
840
+
841
+ </li>
842
+ <li>To delete an entire directory tree use <a
843
+ href="Dir.html#M000049">rmtree</a>
844
+
845
+ </li>
846
+ <li>To delete anything except a populated directory use <a
847
+ href="Grande.html#M000091">delete</a>
848
+
849
+ </li>
850
+ <li>To delete anything use <a href="Grande.html#M000092">delete!</a>
851
+
852
+ </li>
853
+ </ul>
854
+ <p>
855
+ In all cases, deleting something that does not exist is considered
856
+ successful
857
+ </p>
858
+ </div>
859
+ </div>
860
+
861
+ <div id="method-M000090" class="method-detail">
862
+ <a name="M000090"></a>
863
+
864
+ <div class="method-heading">
865
+ <a href="Grande.src/M000090.html" target="Code" class="method-signature"
866
+ onclick="popupCode('Grande.src/M000090.html');return false;">
867
+ <span class="method-name">each</span><span class="method-args">(*args,&amp;block)</span>
868
+ </a>
869
+ </div>
870
+
871
+ <div class="method-description">
872
+ <p>
873
+ Iterate through a rio. Executes the block for each item selected for the
874
+ Rio. See <a href="GrandeStream.html#M000055">lines</a>, <a
875
+ href="GrandeStream.html#M000057">records</a>, <a
876
+ href="GrandeStream.html#M000056">bytes</a>, <a
877
+ href="GrandeEntry.html#M000110">files</a>, <a
878
+ href="GrandeEntry.html#M000106">dirs</a>, <a
879
+ href="Grande.html#M000089">[]</a> and <a
880
+ href="Grande.html#M000088">to_a</a> for more information on how records are
881
+ selected and what kind of record is passed to the block.
882
+ </p>
883
+ <p>
884
+ <a href="Grande.html#M000090">each</a> is the fundemental method for all
885
+ the Rio grande operators. <a href="Grande.html#M000088">to_a</a> and the
886
+ Rio copy operators <a href="Grande.html#M000100"><</a>, <a
887
+ href="Grande.html#M000098"><<</a>, <a href="Grande.html#M000096">>></a>,
888
+ and <a href="Grande.html#M000093">></a> are all implemented in terms of <a
889
+ href="Grande.html#M000090">each</a>.
890
+ </p>
891
+ <p>
892
+ While <a href="Grande.html#M000090">each</a> is fundamental to a Rio, it
893
+ rarely needs actually be called because all the grande configuration
894
+ methods will also take a block and call <a
895
+ href="Grande.html#M000090">each</a> if one is given. So the existance of a
896
+ block after many methods is taken as an implied <a
897
+ href="Grande.html#M000090">each</a>
898
+ </p>
899
+ <p>
900
+ For Rios that refer to files, the item passed to the block is a String
901
+ containing the line or block as selected by <a
902
+ href="GrandeStream.html#M000055">lines</a>, or <a
903
+ href="GrandeStream.html#M000056">bytes</a>. <tt>lines</tt> is the default.
904
+ </p>
905
+ <pre>
906
+ rio('afile').lines.each { |line| ...}
907
+ </pre>
908
+ <p>
909
+ The block passed to <tt>each</tt> will also accept an optional second
910
+ parameter which will contain the result of the matching function. What this
911
+ variable contains depends on the argument to <tt>lines</tt> that resulted
912
+ in the match as follows:
913
+ </p>
914
+ <table>
915
+ <tr><td valign="top">Regexp:</td><td>The MatchData that resulted from the match.
916
+
917
+ </td></tr>
918
+ <tr><td valign="top">Range:</td><td>The record number of the matching record.
919
+
920
+ </td></tr>
921
+ <tr><td valign="top">Fixnum:</td><td>The record number of the matching record.
922
+
923
+ </td></tr>
924
+ <tr><td valign="top">Proc:</td><td>The value returned by the proc.
925
+
926
+ </td></tr>
927
+ <tr><td valign="top">Symbol:</td><td>The value resulting from sending the symbol to the String.
928
+
929
+ </td></tr>
930
+ </table>
931
+ <p>
932
+ If no selection arguments were used, this variable will simply contain
933
+ <tt>true</tt>.
934
+ </p>
935
+ <pre>
936
+ rio(??).puts(%w[0:zero 1:one]).rewind.lines(/(\d+):([a-z]+)/) do |line,match|
937
+ puts(&quot;#{match[1]} is spelled '#{match[2]}'&quot;)
938
+ end
939
+ </pre>
940
+ <p>
941
+ Produces:
942
+ </p>
943
+ <pre>
944
+ 0 is spelled 'zero'
945
+ 1 is spelled 'one'
946
+ </pre>
947
+ <p>
948
+ For Rios that refer to directories, the item passed to the block is a Rio
949
+ refering to the directory entry.
950
+ </p>
951
+ <pre>
952
+ rio('adir').files.each do |file|
953
+ file.kind_of?(RIO::Rio) # true
954
+ end
955
+ </pre>
956
+ <p>
957
+ In addition, the Rio passed to the block inherits certain attributes from
958
+ the directory Rio.
959
+ </p>
960
+ <pre>
961
+ rio('adir').files.chomp.each do |file| # chomp is ignored for directories,
962
+ file.each do |line| # chomp attribute is inherited by the file rio
963
+ # .. line is chomped
964
+ end
965
+ end
966
+ </pre>
967
+ <p>
968
+ <a href="Grande.html#M000090">each</a> returns the Rio which called it.
969
+ </p>
970
+ <p>
971
+ Here are a few illustrative examples
972
+ </p>
973
+ <ul>
974
+ <li>Processing lines in a file
975
+
976
+ <pre>
977
+ rio('f.txt').each { |line| ... } # execute block for every line in the file
978
+ rio('f.txt').lines.each { |line| ... } # same thing
979
+ rio('f.txt').lines { |line| ... } # same thing
980
+
981
+ rio('f.txt').chomp.each { |line| ... } # same as above with lines chomped
982
+ rio('f.txt').chomp { |line| ... } # ditto
983
+ rio('f.txt').lines.chomp { |line| ... } # ditto
984
+ rio('f.txt').chomp.lines { |line| ... } # ditto
985
+
986
+ rio('f.txt.gz').gzip.each { |line| ... } # execute block for every line in a gzipped file
987
+ rio('f.txt.gz').gzip { |line| ... } # same thing
988
+ rio('f.txt.gz').lines.gzip { |line| ... } # same thing
989
+
990
+ rio('f.txt.gz').gzip.chomp { |line| ... } # chomp lines from a gzipped file
991
+ rio('f.txt.gz').gzip.chomp.each { |line| ... } # ditto
992
+ rio('f.txt.gz').chomp.lines.gzip { |line| ... } # ditto
993
+
994
+ rio('f.txt').lines(0..9) { |line| ... } # execute block for the first 10 lines in the file
995
+ rio('f.txt').lines(0..9).each { |line| ... } # same thing
996
+
997
+ rio('f.txt').lines(/^\s*#/) { |line| ... } # execute block for comment-only lines
998
+ rio('f.txt').lines(/^\s*#/).each { |line| ... } # same thing
999
+
1000
+ rio('f.txt').lines(0,/Rio/) { |line| ... } # execute block for the first line and
1001
+ # all lines containing 'Rio'
1002
+
1003
+ rio('f.txt.gz').gzip.chomp.lines(0..1) { |line| ... } # first 2 lines chomped from a gzip file
1004
+ </pre>
1005
+ </li>
1006
+ <li>Processing a file a block at a time
1007
+
1008
+ <pre>
1009
+ rio('f.dat').bytes(10).each { |data| ... } # process the file 10 bytes at a time
1010
+ rio('f.dat').bytes(10) { |data| ... } # same thing
1011
+ rio('f.dat').bytes(10).records(2,4) { |data| ... } # only 3rd and 5th ten-byte data-block
1012
+ rio('f.dat.gz').gzip.records(2,4).bytes(10) { |data| ... } # same from a gzipped file
1013
+ </pre>
1014
+ </li>
1015
+ <li>Iterating over directories
1016
+
1017
+ <pre>
1018
+ rio('adir').each { |ent| ... } # execute the block for each entry in the directory 'adir'
1019
+ rio('adir').files.each { |file| ...} # only files
1020
+ rio('adir').files { |file| ...} # ditto
1021
+ rio('adir').all.files { |file| ...} # files, recurse into subdirectories
1022
+ rio('adir').dirs { |dir| ...} # only directories
1023
+ rio('adir').files('*.rb') { |file| ...} # only .rb files using a glob
1024
+ rio('adir').files(/\.rb$/) { |file| ...} # only .rb files using a regular expression
1025
+ rio('adir').all.files('*.rb') { |file| ...} # .rb files, recursing into subdirectories
1026
+ rio('adir').dirs(/^\./) { |dir| ... } # only dot directories
1027
+ rio('adir').dirs('/home/*') { |dir| ... } # home directories
1028
+ </pre>
1029
+ </li>
1030
+ </ul>
1031
+ <p>
1032
+ See <a href="../Doc/HOWTO.html">RIO::Doc::HOWTO</a> and <a
1033
+ href="../Doc/SYNOPSIS.html">RIO::Doc::SYNOPSIS</a> for more examples, and
1034
+ <a href="../Doc/INTRO.html">RIO::Doc::INTRO</a> for further explanation.
1035
+ </p>
1036
+ </div>
1037
+ </div>
1038
+
1039
+ <div id="method-M000104" class="method-detail">
1040
+ <a name="M000104"></a>
1041
+
1042
+ <div class="method-heading">
1043
+ <a href="Grande.src/M000104.html" target="Code" class="method-signature"
1044
+ onclick="popupCode('Grande.src/M000104.html');return false;">
1045
+ <span class="method-name">empty?</span><span class="method-args">()</span>
1046
+ </a>
1047
+ </div>
1048
+
1049
+ <div class="method-description">
1050
+ <p>
1051
+ Returns true if the referenced file or directory is empty after honoring
1052
+ the grande selection methods.
1053
+ </p>
1054
+ <pre>
1055
+ rio('f0').delete!.touch.empty? #=&gt; true
1056
+ rio('f1').puts!(&quot;Not Empty\n&quot;).empty? #=&gt; false
1057
+ rio('d0').delete!.mkdir.empty? #=&gt; true
1058
+ </pre>
1059
+ </div>
1060
+ </div>
1061
+
1062
+ <div id="method-M000102" class="method-detail">
1063
+ <a name="M000102"></a>
1064
+
1065
+ <div class="method-heading">
1066
+ <a href="Grande.src/M000102.html" target="Code" class="method-signature"
1067
+ onclick="popupCode('Grande.src/M000102.html');return false;">
1068
+ <span class="method-name">get</span><span class="method-args">()</span>
1069
+ </a>
1070
+ </div>
1071
+
1072
+ <div class="method-description">
1073
+ <p>
1074
+ Reads and returns the next record or entry from a Rio, honoring the grande
1075
+ selection methods.
1076
+ </p>
1077
+ <p>
1078
+ Returns nil on end of file.
1079
+ </p>
1080
+ <p>
1081
+ See also <a href="GrandeStream.html#M000057">records</a>, <a
1082
+ href="GrandeStream.html#M000055">lines</a>, <a
1083
+ href="Grande.html#M000090">each</a>, <a href="Grande.html#M000089">[]</a>
1084
+ </p>
1085
+ <pre>
1086
+ ario = rio('afile').lines(10..12)
1087
+ line10 = ario.get
1088
+ line11 = ario.get
1089
+ line12 = ario.get
1090
+ a_nil = ario.get
1091
+
1092
+ ario = rio('adir').entries('*.txt')
1093
+ ent1 = ario.get
1094
+ ent2 = ario.get
1095
+ </pre>
1096
+ </div>
1097
+ </div>
1098
+
1099
+ <div id="method-M000103" class="method-detail">
1100
+ <a name="M000103"></a>
1101
+
1102
+ <div class="method-heading">
1103
+ <a href="Grande.src/M000103.html" target="Code" class="method-signature"
1104
+ onclick="popupCode('Grande.src/M000103.html');return false;">
1105
+ <span class="method-name">skip</span><span class="method-args">(*args,&amp;block)</span>
1106
+ </a>
1107
+ </div>
1108
+
1109
+ <div class="method-description">
1110
+ <p>
1111
+ Grande Exclude method
1112
+ </p>
1113
+ <p>
1114
+ <tt>skip</tt> can be used in two ways.
1115
+ </p>
1116
+ <p>
1117
+ If called with no arguments it reverses the polarity of the next non-skip
1118
+ grande selection method that is called. That is, it turns <tt>lines</tt>,
1119
+ <tt>records</tt>, <tt>rows</tt>, <tt>files</tt>, <tt>dirs</tt> and
1120
+ <tt>entries</tt> into <tt>skiplines</tt>, <tt>skiprecords</tt>,
1121
+ <tt>skiprows</tt>, <tt>skipfiles</tt>, <tt>skipdirs</tt>, and
1122
+ <tt>skipentries</tt>, respectively.
1123
+ </p>
1124
+ <pre>
1125
+ rio('afile').skip.lines(0..5) # same as rio('afile').skiplines(0..5)
1126
+ rio('adir').skip.files('*~') # same as rio('adir').skipfiles('*~')
1127
+ </pre>
1128
+ <p>
1129
+ Note that it only affects the next selection method seen &#8212; and may be
1130
+ used more than once. If no grande selection method is seen, <tt>skip</tt>
1131
+ is ignored.
1132
+ </p>
1133
+ <p>
1134
+ When called with arguments it acts like <a
1135
+ href="GrandeEntry.html#M000109">skipentries</a> for directory Rios and like
1136
+ <a href="GrandeStream.html#M000058">skiprecords</a> for stream Rios.
1137
+ </p>
1138
+ <pre>
1139
+ rio('afile').lines(/Rio/).skip[0..4] # lines containg 'Rio' excluding the
1140
+ # first five lines
1141
+
1142
+ rio('adir').files('*.rb').skip[:symlink?] # .rb files, but not symlinks to
1143
+ # .rb files
1144
+ </pre>
1145
+ <p>
1146
+ If a block is given, behaves as if <tt>skip(*args).each(&amp;block)</tt>
1147
+ had been called.
1148
+ </p>
1149
+ <p>
1150
+ Returns the Rio.
1151
+ </p>
1152
+ <p>
1153
+ See <a href="GrandeStream.html#M000059">skiplines</a>, <a
1154
+ href="GrandeStream.html#M000058">skiprecords</a>, <a
1155
+ href="GrandeStream.html#M000061">skiprows</a>, <a
1156
+ href="GrandeEntry.html#M000111">skipfiles</a>, <a
1157
+ href="GrandeEntry.html#M000107">skipdirs</a>, and <a
1158
+ href="GrandeEntry.html#M000109">skipentries</a>.
1159
+ </p>
1160
+ </div>
1161
+ </div>
1162
+
1163
+ <div id="method-M000105" class="method-detail">
1164
+ <a name="M000105"></a>
1165
+
1166
+ <div class="method-heading">
1167
+ <a href="Grande.src/M000105.html" target="Code" class="method-signature"
1168
+ onclick="popupCode('Grande.src/M000105.html');return false;">
1169
+ <span class="method-name">split</span><span class="method-args">(*args,&amp;block)</span>
1170
+ </a>
1171
+ </div>
1172
+
1173
+ <div class="method-description">
1174
+ <p>
1175
+ <a href="Grande.html#M000105">split</a> has two distinct behaviors
1176
+ depending on whether or not it is called with an argument.
1177
+ </p>
1178
+ <h4>split-with-no-aruments:</h4>
1179
+ <p>
1180
+ Returns an array of Rios, one for each path element. (Note that this
1181
+ behavior differs from File#split.)
1182
+ </p>
1183
+ <pre>
1184
+ rio('a/b/c').split #=&gt; [rio('a'),rio('b'),rio('c')]
1185
+ </pre>
1186
+ <p>
1187
+ The array returned is extended with a <tt>to_rio</tt> method, which will
1188
+ put the parts back together again.
1189
+ </p>
1190
+ <pre>
1191
+ ary = rio('a/b/c').split #=&gt; [rio('a'),rio('b'),rio('c')]
1192
+ ary.to_rio #=&gt; rio('a/b/c')
1193
+
1194
+ ary = rio('a/b/c').split #=&gt; [rio('a'),rio('b'),rio('c')]
1195
+ ary[1] = rio('d')
1196
+ ary.to_rio #=&gt; rio('a/d/c')
1197
+ </pre>
1198
+ <p>
1199
+ See also <a href="Path.html#M000200">join</a>, <a
1200
+ href="Path.html#M000202">/</a>, <a href="Path.html#M000201">splitpath</a>
1201
+ </p>
1202
+ <h4>split-with-an-argument:</h4>
1203
+ <p>
1204
+ This causes String#split(arg) to be called on every line before it is
1205
+ returned. An array of the split lines is returned when iterating
1206
+ </p>
1207
+ <pre>
1208
+ rio('/etc/passwd').split(':').columns(0,2) { |ary|
1209
+ username,uid = ary
1210
+ }
1211
+
1212
+ rio('/etc/passwd').split(':').columns(0,2).to_a #=&gt; [[user1,uid1],[user2,uid2]]
1213
+ </pre>
1214
+ </div>
1215
+ </div>
1216
+
1217
+ <div id="method-M000088" class="method-detail">
1218
+ <a name="M000088"></a>
1219
+
1220
+ <div class="method-heading">
1221
+ <a href="Grande.src/M000088.html" target="Code" class="method-signature"
1222
+ onclick="popupCode('Grande.src/M000088.html');return false;">
1223
+ <span class="method-name">to_a</span><span class="method-args">()</span>
1224
+ </a>
1225
+ </div>
1226
+
1227
+ <div class="method-description">
1228
+ <p>
1229
+ Returns the contents of the rio as an array. (See ::Enumerable#to_a)
1230
+ </p>
1231
+ <p>
1232
+ <a href="Grande.html#M000088">to_a</a> is implemented in terms of <a
1233
+ href="Grande.html#M000090">each</a> so the the following are roughly
1234
+ equivelent
1235
+ </p>
1236
+ <pre>
1237
+ ary = ario.to_a
1238
+
1239
+ ary = []
1240
+ ario.each do |rec|
1241
+ ary &lt;&lt; ary
1242
+ end
1243
+ </pre>
1244
+ <p>
1245
+ What constitutes an array element is determined by <a
1246
+ href="GrandeStream.html#M000055">lines</a>, <a
1247
+ href="GrandeStream.html#M000056">bytes</a>, <a
1248
+ href="GrandeStream.html#M000057">records</a>, <a
1249
+ href="GrandeStream.html#M000060">rows</a> or by an extension such as <a
1250
+ href="CSV.html#M000116">csv</a>. <a
1251
+ href="GrandeStream.html#M000055">lines</a> is the default.
1252
+ </p>
1253
+ <pre>
1254
+ rio('afile.txt').to_a # returns an array of the lines in afile.txt
1255
+
1256
+ rio('afile.txt').lines(1...3).to_a # an array containing lines 1 and 2 of afile.txt
1257
+
1258
+ rio('afile.dat').bytes(50).to_a # an array containing the contents of afile.dat broken
1259
+ # up into 50 byte chunks
1260
+ </pre>
1261
+ <p>
1262
+ See also <a href="Grande.html#M000089">[]</a> (subscript operator)
1263
+ </p>
1264
+ </div>
1265
+ </div>
1266
+
1267
+ <div id="method-M000095" class="method-detail">
1268
+ <a name="M000095"></a>
1269
+
1270
+ <div class="method-heading">
1271
+ <a href="Grande.src/M000095.html" target="Code" class="method-signature"
1272
+ onclick="popupCode('Grande.src/M000095.html');return false;">
1273
+ <span class="method-name">|</span><span class="method-args">(destination)</span>
1274
+ </a>
1275
+ </div>
1276
+
1277
+ <div class="method-description">
1278
+ <p>
1279
+ Grande Pipe Operator
1280
+ </p>
1281
+ <p>
1282
+ The Rio pipe operator is actually an alternative syntax for calling the
1283
+ copy-to operator, designed to allow several copy operation to be performed
1284
+ in one line of code, with behaviour that mimics the pipe operator commonly
1285
+ available in shells.
1286
+ </p>
1287
+ <p>
1288
+ If <tt>destination</tt> is a <tt>cmdio</tt>, a <tt>cmdpipe</tt> Rio is
1289
+ returned, and none of the commands are run.
1290
+ </p>
1291
+ <p>
1292
+ Otherwise the <tt>cmdpipe</tt> Rio is run with the output of the pipe being
1293
+ copied to the destination. In this case a Rio representing the
1294
+ <tt>destination</tt> is returned.
1295
+ </p>
1296
+ <p>
1297
+ If destination is not a Rio it is passed to the Rio constructor as is done
1298
+ with the copy-to operator except that if <tt>destination</tt> is a String
1299
+ it is assumed to be a command instead of a path.
1300
+ </p>
1301
+ <pre>
1302
+ rio('afile') | rio(?-,'grep i') | rio(?-) # returns rio(?-)
1303
+ # equivelent to rio(?-, 'grep i') &lt; rio('afile') &gt; rio(?-)
1304
+
1305
+ rio('infile') | rio(?-, 'acmd') | rio(?-, 'acmd2') | rio('outfile')
1306
+ # same as
1307
+ # acmd = rio(?-,'acmd')
1308
+ # acmd2 = rio(?-,'acmd2')
1309
+ # out = rio('outfile')
1310
+ # acmd &lt; rio('infile')
1311
+ # acmd2 &lt; acmd
1312
+ # out &lt; acmd2
1313
+
1314
+ rio('afile') | 'acmd' | 'acmd2' | rio('outfile') # same thing
1315
+
1316
+ acmdpipe = rio(?-,'acmd') | 'acmd2'
1317
+ rio('afile') | acmdpipe | rio('outfile') # same thing
1318
+
1319
+ acmdpipe1 = rio(?|,'acmd','acmd2')
1320
+ rio('afile') | acmdpipe1 | rio('outfile') # same thing
1321
+
1322
+ acmdpipe2 = rio('afile') | 'acmd' | 'acmd2'
1323
+ acmdpipe2 | rio('outfile') # same thing
1324
+ </pre>
1325
+ <p>
1326
+ The grande pipe operator can not be used to create a <tt>cmdpipe</tt> Rio
1327
+ that includes a destination. This must be done using a Rio constructor
1328
+ </p>
1329
+ <pre>
1330
+ cmd_with_output = rio(?|,'acmd',rio('outfile'))
1331
+ rio('afile') | cmd_with_output # same as above
1332
+ </pre>
1333
+ </div>
1334
+ </div>
1335
+
1336
+
1337
+ </div>
1338
+ </div>
1339
+
1340
+
1341
+ </div>
1342
+
1343
+
1344
+ <div id="validator-badges">
1345
+ <p><small>Copyright &copy; 2005,2006,2007 Christopher Kleckner. <a href="http://www.gnu.org/licenses/gpl.html">All rights reserved</a>.</small></p>
1346
+ </div>
1347
+
1348
+ </body>
1349
+ </html>