Search results

  1. www.skorks.com/2009/08/how-a-ruby-case-​statement-works...   Cached
    I found case statements in Ruby pretty interesting as they are capable of doing a little more than the equivalent constructs in ... a hash becomes easier to manage ...
  2. ruby.about.com/od/control/a/The-Case-​Statement.htm   Cached
    The case statement in Ruby, on the other hand, ... However, don't forget that case statements are much more powerful than simple array or hash lookups, ...
  3. www.dotnetperls.com/hash-ruby   Cached
    Array Hash Case Class DateTime Files If-Statement Iterators Math Methods Nil Numbers Set String While-Loop. A hash is an optimized collection. It stores keys and values.
  4. www.java2s.com/Code/Ruby/Statement/​case.htm   Cached
    Hash: 13. Language Basics: 14. Method: 15. Network: 16. Number: 17. Rails: 18. ... Here's the general format of the Ruby case statement: 2. Using the case Statement ...
  5. en.wikipedia.org/wiki/Switch_statement   Cached
    In computer programming languages, a switch statement is a type of selection control mechanism used to allow the value of a variable or expression to change the ...
  6. ruby-doc.org/docs/ruby-doc-bundle/​Manual/man-1.4/syntax.html   Cached
    The case of characters in source files is significant. ... Ruby identifiers are consist of alphabets, ... The begin statement has an optional else clause ...
  7. www.java2s.com/Code/Ruby/Statement/​UsingthecaseStatement.htm   Cached
    Hash: 13. Language Basics: 14. Method: 15. Network: 16. Number: 17. Rails: 18. Range: 19. Reflection: 20. ... Here's the general format of the Ruby case statement: 2 ...
  8. www.java2s.com/Code/Ruby/Statement/​IfvsCase.htm   Cached
    Hash: 13. Language Basics: 14. Method: 15. Network: 16. Number: 17. Rails: 18. Range: 19. ... Here's the general format of the Ruby case statement: 2. Using the case ...
  9. compgroups.net/comp.lang.ruby/case-vs-​using-if-question/...   Cached
    So would multiple if statements be a better ruby way ... Use a case statement when one side ... > > In that case (!) I would definitively use a Hash as Justin ...
  10. stackoverflow.com/.../use-hash-or-case-​statement-ruby   Cached
    A hash is a data structure, and a case statement is a control structure. You should use a hash when you are just retrieving some data (like in the example you provided).
  11. stackoverflow.com/questions/...a-hash-​with-a-case-statement   Cached
    I am trying to write a function that takes the day number of the date, for example, today (March 29) is the 88th day of the year. It then returns a hash containing ...
  12. stackoverflow.com/.../short-ruby-case-​statement-using...work   Cached
    Actually the Ruby case statement has two forms, and one of the is indeed meant to run a bunch of vaguely related ifs. ... Use hash or case-statement [Ruby] 8.
  13. stackoverflow.com/.../display-dynamic-​case-statement-in-ruby   Cached
    Ruby has no built-in menu stuff like shell scripting languages do. When doing menus, I favor constructing a hash of possible options and operating on that:
  14. stackoverflow.com/...in-ruby-a-​hash...with-a-case-statement   Cached
    We have a few places in a time-critical script where we convert old IDs into strings. At the moment, we use case statements inside a function, like so: