Class: Trollo::Task

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Troller, Workflow
Defined in:
lib/trollo/task.rb

Instance Method Summary collapse

Methods included from Troller

included

Instance Method Details

#overdue?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/trollo/task.rb', line 31

def overdue?
  incomplete? && due_at && (Time.now > due_at)
end

#set_ordinalObject



27
28
29
# File 'lib/trollo/task.rb', line 27

def set_ordinal
  self.ordinal ||= tasklist.tasks.length + 1
end

#update_tasklistObject



35
36
37
# File 'lib/trollo/task.rb', line 35

def update_tasklist
  tasklist.check
end