Sha256: b6498ff4227199748d1380001fc3c09c4ea8874cfd8b0a60fadf96bbdb8eb57a

Contents?: true

Size: 536 Bytes

Versions: 13

Compression:

Stored size: 536 Bytes

Contents

require_relative 'runby_range'

module Runby
  # Represents a range of paces, from fast to slow.
  class PaceRange < RunbyRange
    def initialize(fast, slow)
      @fast = Runby::RunbyTime.new(fast)
      @slow = Runby::RunbyTime.new(slow)
    end

    # Create a new pace range from an existing speed range.
    def self.from_speed_range(speed_range)
      fast = Runby::RunMath.convert_speed_to_pace speed_range.fast
      slow = Runby::RunMath.convert_speed_to_pace speed_range.slow
      PaceRange.new fast, slow
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
runby_pace-0.6.90 lib/runby_pace/pace_range.rb
runby_pace-0.6.89 lib/runby_pace/pace_range.rb
runby_pace-0.6.88 lib/runby_pace/pace_range.rb
runby_pace-0.6.87 lib/runby_pace/pace_range.rb
runby_pace-0.5.86 lib/runby_pace/pace_range.rb
runby_pace-0.5.85 lib/runby_pace/pace_range.rb
runby_pace-0.4.84 lib/runby_pace/pace_range.rb
runby_pace-0.4.83 lib/runby_pace/pace_range.rb
runby_pace-0.4.82 lib/runby_pace/pace_range.rb
runby_pace-0.4.81 lib/runby_pace/pace_range.rb
runby_pace-0.4.79 lib/runby_pace/pace_range.rb
runby_pace-0.4.78 lib/runby_pace/pace_range.rb
runby_pace-0.4.77 lib/runby_pace/pace_range.rb