Module: MiGA::Result::Dates
Overview
Helper module including date-specific functions for results.
Instance Method Summary collapse
-
#done_at ⇒ Object
Returns the end (done) date of processing as Time or
nil
if it doesn’t exist. -
#running_time ⇒ Object
Time it took for the result to complete as Float in minutes.
-
#started_at ⇒ Object
Returns the start date of processing as Time or
nil
if it doesn’t exist.
Instance Method Details
#done_at ⇒ Object
Returns the end (done) date of processing as Time or nil
if it doesn’t exist.
18 19 20 |
# File 'lib/miga/result/dates.rb', line 18 def done_at date_at :done end |
#running_time ⇒ Object
Time it took for the result to complete as Float in minutes.
24 25 26 27 28 |
# File 'lib/miga/result/dates.rb', line 24 def running_time a = started_at or return nil b = done_at or return nil (b - a).to_f / 60.0 end |
#started_at ⇒ Object
Returns the start date of processing as Time or nil
if it doesn’t exist.
11 12 13 |
# File 'lib/miga/result/dates.rb', line 11 def started_at date_at :start end |