Skip to content

Instantly share code, notes, and snippets.

@neilmiddleton
Created March 7, 2013 16:38
Show Gist options
  • Save neilmiddleton/5109447 to your computer and use it in GitHub Desktop.
Save neilmiddleton/5109447 to your computer and use it in GitHub Desktop.
class variables
class Person
attr gender
def male?
@gender == 'male'
end
end
p = Person.new
p.gender = 'male'
p.male?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment