You often see the Array shortcut in code…
%w(foo bar sed) # => ["foo", "bar", "sed"]
…but how many of the other Ruby Shortcuts are you aware of? Personally I knew about half of them.
You often see the Array shortcut in code…
%w(foo bar sed) # => ["foo", "bar", "sed"]
…but how many of the other Ruby Shortcuts are you aware of? Personally I knew about half of them.
© 2012. jfine.org. Powered by WordPress, theme by WPShoppe, both tweaked by Jared Fine.