Sha256: 5af8eb88aae47c2f4a776bf0fe00929ca40028c91cf512c917079c8f6bf59454

Contents?: true

Size: 426 Bytes

Versions: 27

Compression:

Stored size: 426 Bytes

Contents

module Runby
  # Base class for ranges of Runby data, e.g. PaceRange, SpeedRange, ...
  class RunbyRange
    attr_reader :fast, :slow

    def initialize
      @fast = nil
      @slow = nil
      raise 'RunbyRange is a base class for PaceRange and SpeedRange. Instantiate one of them instead.'
    end

    def to_s
      if @fast == @slow
        @fast.to_s
      else
        "#{@fast}-#{@slow}"
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
runby_pace-0.6.106 lib/runby_pace/runby_range.rb
runby_pace-0.6.105 lib/runby_pace/runby_range.rb
runby_pace-0.6.104 lib/runby_pace/runby_range.rb
runby_pace-0.6.103 lib/runby_pace/runby_range.rb
runby_pace-0.6.102 lib/runby_pace/runby_range.rb
runby_pace-0.6.101 lib/runby_pace/runby_range.rb
runby_pace-0.6.100 lib/runby_pace/runby_range.rb
runby_pace-0.6.98 lib/runby_pace/runby_range.rb
runby_pace-0.6.99 lib/runby_pace/runby_range.rb
runby_pace-0.6.97 lib/runby_pace/runby_range.rb
runby_pace-0.6.94 lib/runby_pace/runby_range.rb
runby_pace-0.6.91 lib/runby_pace/runby_range.rb
runby_pace-0.6.90 lib/runby_pace/runby_range.rb
runby_pace-0.6.89 lib/runby_pace/runby_range.rb
runby_pace-0.6.88 lib/runby_pace/runby_range.rb
runby_pace-0.6.87 lib/runby_pace/runby_range.rb
runby_pace-0.5.86 lib/runby_pace/runby_range.rb
runby_pace-0.5.85 lib/runby_pace/runby_range.rb
runby_pace-0.4.84 lib/runby_pace/runby_range.rb
runby_pace-0.4.83 lib/runby_pace/runby_range.rb