Sha256: ceefdc4c4d635fc8f89685b49f5f41ddd3303d13094940a9742ffa0ed7379f41

Contents?: true

Size: 407 Bytes

Versions: 11

Compression:

Stored size: 407 Bytes

Contents

module RunbyPace

  class PaceUnits

    def self.description(units)
      descriptions[units]
    end

    def self.distance_conversion_factor(units)
      self.distance_conversion_factors[units]
    end

    private

    def self.descriptions
      { :km => 'Kilometers', :mi => 'Miles' }
    end

    def self.distance_conversion_factors
      { :km => 1.0, :mi => 1.612903225806452 }
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
runby_pace-0.2.68 lib/runby_pace/pace_units.rb
runby_pace-0.2.67 lib/runby_pace/pace_units.rb
runby_pace-0.2.66 lib/runby_pace/pace_units.rb
runby_pace-0.2.65 lib/runby_pace/pace_units.rb
runby_pace-0.2.64 lib/runby_pace/pace_units.rb
runby_pace-0.2.63 lib/runby_pace/pace_units.rb
runby_pace-0.2.62 lib/runby_pace/pace_units.rb
runby_pace-0.2.61 lib/runby_pace/pace_units.rb
runby_pace-0.2.60 lib/runby_pace/pace_units.rb
runby_pace-0.2.59 lib/runby_pace/pace_units.rb
runby_pace-0.2.58 lib/runby_pace/pace_units.rb