Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > nuby question: question marks in method names

Reply
Thread Tools

nuby question: question marks in method names

 
 
Edwin Eyan Moragas
Guest
Posts: n/a
 
      08-30-2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefine Method Only Marks the Method Undefined Su Zhang Ruby 3 04-18-2011 12:11 AM
nuby: method defined in two classes Peņa, Botp Ruby 2 12-07-2005 07:14 AM
not dust marks - water marks! pshaw@emmet.com Digital Photography 0 04-14-2005 05:53 AM
nuby: determine method passed and determine the receiver that received the method Peņa, Botp Ruby 1 01-24-2004 07:51 PM
nuby question re a method Van Jacques Ruby 0 12-10-2003 02:47 AM



Advertisments