Comments on: The Many Uses Of Ruby Case Statements http://www.blackbytes.info/2015/10/ruby-case/ Ruby Programming Tutorials Sat, 07 Jan 2017 19:44:28 +0000 hourly 1 https://wordpress.org/?v=4.6.2 By: Robert http://www.blackbytes.info/2015/10/ruby-case/#comment-425 Sun, 03 Jan 2016 11:23:35 +0000 http://www.blackbytes.info/?p=2290#comment-425 Instead of proc(&:odd?) you can also use :odd?.to_proc.

Btw. odd and even should really be constants IMO.

]]>
By: KRoot (@kraevroot) http://www.blackbytes.info/2015/10/ruby-case/#comment-421 Sat, 05 Dec 2015 10:17:51 +0000 http://www.blackbytes.info/?p=2290#comment-421 You can use case with arrays:

]]>
By: danielpclark http://www.blackbytes.info/2015/10/ruby-case/#comment-420 Fri, 04 Dec 2015 21:33:30 +0000 http://www.blackbytes.info/?p=2290#comment-420 I’ve never seen a Proc defined that way proc(&:odd?). That’s pretty genius! ^_^

]]>
By: Alexey Pokhozhaev http://www.blackbytes.info/2015/10/ruby-case/#comment-415 Fri, 23 Oct 2015 08:41:13 +0000 http://www.blackbytes.info/?p=2290#comment-415 Ok, thanks!

]]>
By: Jesus Castello http://www.blackbytes.info/2015/10/ruby-case/#comment-414 Thu, 22 Oct 2015 22:59:59 +0000 http://www.blackbytes.info/?p=2290#comment-414 Thank you 🙂

]]>