nuby question: question marks in method names

E

Edwin Eyan Moragas

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top