fcoury / octopi

A Ruby interface to GitHub API v2
http://hasmany.info/2009/4/18/ruby-interface-to-github-api
MIT License
216 stars 47 forks source link

Boolean Attributes' Names Should Have '?' Suffix #2

Closed runpaint closed 15 years ago

runpaint commented 15 years ago

When we generate method names for an object we should use a '?' suffix if the attribute is boolean. For example, a Repository object should have a .fork? and a .private? method. This is not only a better reflection of conventions, it also disambiguates between, in this example, 'fork' being a verb, i.e. a method which causes the repository to be forked, and 'fork' being an attribute, i.e. indicating whether the repository has been forked.

fcoury commented 15 years ago

runpaint, can we consider this one closed?