Module: MiGA::Result::Dates

Includes:
Base
Included in:
MiGA::Result
Defined in:
lib/miga/result/dates.rb

Overview

Helper module including date-specific functions for results.

Instance Method Summary collapse

Instance Method Details

#done_atObject

Returns the end (done) date of processing as DateTime 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_timeObject

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 * 24 * 60
end

#started_atObject

Returns the start date of processing as DateTime or nil if it doesn't exist.


12
13
14
# File 'lib/miga/result/dates.rb', line 12

def started_at
  date_at :start
end