Sha256: ea586e776dee71eaa8b22987ded0d40b647714a8309278662632e70e26a0fca3
Contents?: true
Size: 458 Bytes
Versions: 30
Compression:
Stored size: 458 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(format: :short) if @fast == @slow @fast.to_s(format: format) else "#{@fast}-#{@slow}" end end end end
Version data entries
30 entries across 30 versions & 1 rubygems