Ruby Code Snippet

Posted in Programming, Ruby on Jan 13, 2008

In Ruby a switch statement looks like this

say = "Hello"

case say
when "Hello" then
	puts "Say Hello"
when "Bye" then
	puts "Say Bye"
end

In PHP a switch statement looks like this


Trackback URI | Comments RSS

Leave a Reply

  • Recent Comments

    • Gregorio Schrecongost: obviously like your web-site however you need to check the spelling on quite a few of your...
    • ekstra łazienki: 76. I would like to thank you for the efforts you have put in writing this web site. I’m...
    • djcity record pool: Good day! This post could not be written any better! Reading through this post reminds me of my...
    • Aline Shiner: I in addition to my buddies have already been following the excellent secrets from your website while...
    • Eve: Such superb text! No idea how you wrote this report..it’d take me weeks. Well worth it though, I’d assume. Have...

    Recent Listened to Tracks

    Loading...

Bad Behavior has blocked 114 access attempts in the last 7 days.

eastern-avalanche
eastern-avalanche
eastern-avalanche
eastern-avalanche