Method: LabTech::Speedup#initialize
- Defined in:
- app/models/lab_tech/speedup.rb
#initialize(baseline: nil, comparison: nil, time: nil, factor: nil) ⇒ Speedup
Returns a new instance of Speedup.
26 27 28 29 30 31 |
# File 'app/models/lab_tech/speedup.rb', line 26 def initialize(baseline: nil, comparison: nil, time: nil, factor: nil) @baseline = baseline &.to_f @comparison = comparison &.to_f @time = time &.to_f || compute_time_delta @factor = factor &.to_f || compute_factor end |