SHARE
TWEET

Untitled

a guest Feb 27th, 2012 16 Never
  1. class IO
  2.   def hello_world
  3.     path = "fileio.txt"
  4.     writeFile(path, "hello") do |file|
  5.       file = File.open(path, "a") do
  6.         write(file, "\nworld") do
  7.           close(file) do
  8.             data = read(path) do
  9.               puts data.last
  10.             end
  11.           end
  12.         end
  13.       end
  14.     end
  15.   end
  16. end
  17.  
  18. IO.new.hello_world
RAW Paste Data
Top