Class: Bosh::Cli::TaskTracking::TotalDuration
- Defined in:
- lib/cli/task_tracking/total_duration.rb
Instance Attribute Summary collapse
-
#finished_at ⇒ Object
Returns the value of attribute finished_at.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
Instance Method Summary collapse
Instance Attribute Details
#finished_at ⇒ Object
Returns the value of attribute finished_at.
3 4 5 |
# File 'lib/cli/task_tracking/total_duration.rb', line 3 def finished_at @finished_at end |
#started_at ⇒ Object
Returns the value of attribute started_at.
3 4 5 |
# File 'lib/cli/task_tracking/total_duration.rb', line 3 def started_at @started_at end |
Instance Method Details
#duration ⇒ Object
15 16 17 |
# File 'lib/cli/task_tracking/total_duration.rb', line 15 def duration @finished_at - @started_at if duration_known? end |
#duration_known? ⇒ Boolean
19 20 21 |
# File 'lib/cli/task_tracking/total_duration.rb', line 19 def duration_known? !!(@finished_at && @started_at) end |