Should every Ruby method returning a boolean have a question mark? -


i have method:

def addnewshow(name)  end 

i want return boolean states whether or not successful. should method have question mark on end of name let user know that's returns, despite not being question, , returning answer question "was successful?"

i don't think it's necessary that. include method check if show exists though:

def exists?(show_name)   #your code check if exists   #return boolean value of true/false if show added or not end 

Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

Admob integration with pygame in android -

.htaccess: Transfer name to index.php if not directory public -