%wallows you to create an array from a string of words marked with a space. here is an example:
irb(main):001:0> %w{ foo bar baz }.each { |word| puts word }
foo
bar
baz
=> ["foo", "bar", "baz"]
Here's the link . This is non-Rails Ruby-ism
source
share