Class: PlanningClient::ToDo
- Inherits:
-
LogicalModel
- Object
- LogicalModel
- PlanningClient::ToDo
- Includes:
- ServiceConfiguration
- Defined in:
- app/models/planning_client/to_do.rb
Instance Method Summary collapse
-
#complete ⇒ Object
mark ToDo as completed.
-
#hold ⇒ Object
mark ToDo as in stand by.
- #json_root ⇒ Object
-
#start ⇒ Object
mark ToDo as in progress.
Methods included from ServiceConfiguration
Instance Method Details
#complete ⇒ Object
mark ToDo as completed
46 47 48 49 50 51 52 53 |
# File 'app/models/planning_client/to_do.rb', line 46 def complete if self.status_transition("complete") self.state = 'completed' self else nil end end |
#hold ⇒ Object
mark ToDo as in stand by
36 37 38 39 40 41 42 43 |
# File 'app/models/planning_client/to_do.rb', line 36 def hold if self.status_transition("hold") self.state = 'stand_by' self else nil end end |
#json_root ⇒ Object
55 56 57 |
# File 'app/models/planning_client/to_do.rb', line 55 def json_root 'to_do' end |
#start ⇒ Object
mark ToDo as in progress
26 27 28 29 30 31 32 33 |
# File 'app/models/planning_client/to_do.rb', line 26 def start if self.status_transition("start") self.state = 'in_progress' self else nil end end |