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 operator request
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="Ara.T.Howard, post: 4483385"] though this only works with the attribute type methods provided by traits: harp:~ > cat a.rb require 'traits' trait 'foo' => true puts( foo ? 'foo' : 'not foo' ) puts( foo? ? 'foo' : 'not foo' ) foo false puts( foo ? 'foo' : 'not foo' ) puts( foo? ? 'foo' : 'not foo' ) harp:~ > ruby a.rb foo foo not foo not foo cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | Your life dwells amoung the causes of death | Like a lamp standing in a strong breeze. --Nagarjuna =============================================================================== [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Ternary operator request
Top