class Runby::RunTypes::DistanceRun

Defines the venerable “distance run”, the backbone of any distance running program.

Most of your runs should be at this pace. Harder than an "easy run" but still conversational.

Attributes

fast_pace_calculator[R]
slow_pace_calculator[R]

Public Class Methods

new() click to toggle source
# File lib/runby_pace/run_types/distance_run.rb, line 18
def initialize
  @fast_pace_calculator = PaceCalculator.new(GoldenPaces.fast, 3.675)
  @slow_pace_calculator = PaceCalculator.new(GoldenPaces.slow, 2.175)
end

Public Instance Methods

description() click to toggle source
# File lib/runby_pace/run_types/distance_run.rb, line 10
def description
  'Distance Run'
end
explanation() click to toggle source
# File lib/runby_pace/run_types/distance_run.rb, line 14
def explanation
  'Most of your weekly training should be comprised of Distance Runs. They are faster than easy runs, 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/distance_run.rb, line 23
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