Changes

Ruby Ranges

261 bytes added, 19:09, 20 November 2007
Using Range Methods
words.reject {|subrange| subrange < 'cal'} # reject values below a specified range value
=> ["cal", "cam", "can", "cao", "cap", "caq", "car"]
 
words.each {|word| puts "Hello " + word} # iterate through each value and preform a task
Hello cab
Hello cac
Hello cad
Hello cae
Hello caf
Hello cag
Hello cah
Hello cai
Hello caj
Hello cak
Hello cal
Hello cam
Hello can
Hello cao
Hello cap
Hello caq
Hello car
 
</pre>