Sha256: bced04a8de1660b7d237ad9d76e389acee053841421933135d810a9a1219a196

Contents?: true

Size: 858 Bytes

Versions: 11

Compression:

Stored size: 858 Bytes

Contents

module Runby
  module RunTypes
    # Your mile race pace, which is also useful for running repetitions at this pace
    class MileRaceRun < RunType
      def description
        'Mile Race Pace'
      end

      def explanation
        'Repetitions run at a pace you would use to race one mile can increase the stroke volume of your heart, strengthen your lungs, increase the number of capillaries around your intermediate and fast twitch fibers, and increase mitochondrial densities around the same.'
      end

      def lookup_pace(five_k_time, distance_units = :km)
        five_k_time = RunbyTime.new(five_k_time)
        mile = Distance.new('1 mile')
        mile_time = RunMath.predict_race_time('5K', five_k_time, mile)
        pace = Pace.new(mile_time, mile).convert_to(distance_units)
        PaceRange.new(pace, pace)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
runby_pace-0.6.143 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.142 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.141 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.140 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.139 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.137 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.136 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.133 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.132 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.131 lib/runby_pace/run_types/mile_race_run.rb
runby_pace-0.6.130 lib/runby_pace/run_types/mile_race_run.rb