class TooDoo::Task
Task
is the base model of the app it's a presenter of stored data
Constants
- CREATED_STATUS
- DONE_STATUS
Attributes
body[R]
status[R]
Public Class Methods
new(body, status = CREATED_STATUS)
click to toggle source
# File lib/toodoo/task.rb, line 12 def initialize(body, status = CREATED_STATUS) @body = body @status = status end
Public Instance Methods
==(other)
click to toggle source
# File lib/toodoo/task.rb, line 25 def ==(other) body == other.body && status == other.status end
done!()
click to toggle source
# File lib/toodoo/task.rb, line 21 def done! @status = DONE_STATUS end
done?()
click to toggle source
# File lib/toodoo/task.rb, line 17 def done? @status == DONE_STATUS end