Skip to content

Instantly share code, notes, and snippets.

@scottswezey
Created August 6, 2010 22:47
Show Gist options
  • Save scottswezey/512154 to your computer and use it in GitHub Desktop.
Save scottswezey/512154 to your computer and use it in GitHub Desktop.
class TodoItem
# provide reader and setter for name and state
attr_accessor :name, :state
def initialize(name)
# store name
self.name = name
# set state to undone
self.state = false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment