Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Ternary Usage
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Greg Willits, post: 4578842"] Thanks for piping up and saying "don't use that." I agree :-) All this is exactly why condition ? do_stuff is very useful. Compact. Readable. Logical. Efficient. Even if it is not a true ternary. I have plenty enough experience in dynamic, reflective, OO programming, to figure out the bulk of Ruby, but Ruby does seems to have its own way of approaching some things compared to my experience. I know there's a book called The Ruby Way -- does it tend to address these kinds of usage idioms where "method 2 out of 4 tends to be the way most people do it"? -- gw [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Ternary Usage
Top