Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   nuby question: question marks in method names (http://www.velocityreviews.com/forums/t816426-nuby-question-question-marks-in-method-names.html)

Edwin Eyan Moragas 08-30-2004 07:11 AM

nuby question: question marks in method names
 
Hi Guys,

it's a bit hard to search for answers to this question so here goes.

i've noticed methods that return booleans have a signature which looks like:
object.something?

in the course of looking for answers, seems like ? is part of the
method, ie, 'something?'
and this is the preferred way saying that something is returning a
boolean value.

1) is there any way to do this automatically?
class X
attr :some_bool
def some_bool?
@some_bool
end
end

2) any tricks you might want to share?

stp
eyan
--
Edwin Eyan Moragas
Main Expectorant

haaktu technologies
spewing spit since '73




All times are GMT. The time now is 11:00 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.