- def ran_for_str
- ran_for = nil
- if state_label
- ran_for = "It "
- if state_label == 'Running'
- ran_for << "has run"
- else
- ran_for << "ran"
- end
- ran_for << " for"
- end
- ran_for
- end
-
- def started_and_active_for_str
- active_for = nil
-
- if started_at
- active_for_1 = "This #{title} started at "
- active_for_2 = "It "
- if state_label == 'Complete'
- active_for_2 << "completed in "
- elsif state_label == 'Failed'
- active_for_2 << "failed after "
- else
- active_for_2 << "has been active for "
- end
- [active_for_1, active_for_2]
- end
- end
-