class Runby::RunbyRange

Base class for ranges of Runby data, e.g. PaceRange, SpeedRange, …

Attributes

fast[R]
slow[R]

Public Class Methods

new() click to toggle source
# File lib/runby_pace/runby_range.rb, line 8
def initialize
  @fast = nil
  @slow = nil
  raise 'RunbyRange is a base class for PaceRange and SpeedRange. Instantiate one of them instead.'
end

Public Instance Methods

to_s(format: :short) click to toggle source
# File lib/runby_pace/runby_range.rb, line 14
def to_s(format: :short)
  if @fast == @slow
    @fast.to_s(format: format)
  else
    "#{@fast}-#{@slow}"
  end
end