Flowdock
loop() public

Repeatedly executes the block.

   loop do
     print "Input: "
     line = gets
     break if !line or line =~ /^qQ/
     # ...
   end
Show source
Register or log in to add new notes.
May 5, 2016
0 thanks

more loops

fruits = [‘apple’,‘orange”]

fruits.each do |fruit|

puts "A fruit of type: #{fruit}"

end