class Runby::RunTypes::EasyRun
An easy run is basically a jog. It should be conversational.
Attributes
fast_pace_calculator[R]
slow_pace_calculator[R]
Public Class Methods
new()
click to toggle source
# File lib/runby_pace/run_types/easy_run.rb, line 17 def initialize @fast_pace_calculator = PaceCalculator.new(GoldenPaces.fast, 1.99) @slow_pace_calculator = PaceCalculator.new(GoldenPaces.slow, 1.35) end
Public Instance Methods
description()
click to toggle source
# File lib/runby_pace/run_types/easy_run.rb, line 9 def description 'Easy Run' end
explanation()
click to toggle source
# File lib/runby_pace/run_types/easy_run.rb, line 13 def explanation 'Also called a recovery run, the easy run is harder than jogging, but you should still be able to carry on a conversation.' end
lookup_pace(five_k_time, distance_units = :km)
click to toggle source
# File lib/runby_pace/run_types/easy_run.rb, line 22 def lookup_pace(five_k_time, distance_units = :km) fast = @fast_pace_calculator.calc(five_k_time, distance_units) slow = @slow_pace_calculator.calc(five_k_time, distance_units) PaceRange.new(fast, slow) end