Guest User

ruby code

a guest
Nov 10th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.26 KB | None | 0 0
  1. x = "File"
  2. y = 1
  3.  
  4. #do check if File1 exists
  5. #if it does, do something
  6. #if it does not run the code below
  7.  
  8. keep_reading_files = true
  9. until keep_reading_files == true
  10. z = x + y.to_s
  11. if File.exists?(z)
  12. x = File.read(z)
  13. else keep_reading_files = false
  14. end #so on
Advertisement
Add Comment
Please, Sign In to add comment