Class: Hacer::TodoInternal

Inherits:
Todo
  • Object
show all
Defined in:
lib/hacer.rb

Overview

Internal Todo subclass for use only by Todolist; clients of Todolist should program against Todo :nodoc:

Instance Attribute Summary

Attributes inherited from Todo

#text, #todo_id

Instance Method Summary collapse

Methods inherited from Todo

#completed?, #to_s

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

#completeObject



132
# File 'lib/hacer.rb', line 132

def complete; @completed = true; end