Class: Hacer::TodoInternal
Overview
Internal Todo subclass for use only by Todolist; clients of Todolist should program against Todo :nodoc:
Instance Attribute Summary
Attributes inherited from Todo
Instance Method Summary collapse
- #complete ⇒ Object
-
#initialize(text, todo_id) ⇒ TodoInternal
constructor
Create a new todo.
Methods inherited from Todo
Constructor Details
#initialize(text, todo_id) ⇒ TodoInternal
Create a new todo
text
-
Text for this todo, e.g. “Take out the trash”
todo_id
-
the identifier for this todo
126 127 128 129 130 |
# File 'lib/hacer.rb', line 126 def initialize(text,todo_id) @todo_id = todo_id @text = text @completed = false end |
Instance Method Details
#complete ⇒ Object
132 |
# File 'lib/hacer.rb', line 132 def complete; @completed = true; end |