lib/runby_pace/distance.rb in runby_pace-0.6.104 vs lib/runby_pace/distance.rb in runby_pace-0.6.105

- old
+ new

@@ -51,14 +51,14 @@ error_message = "#{ex.message}" end { distance: distance, error: error_message } end - def to_s(format = :long) + def to_s(format: :long) formatted_multiplier = format('%g', @multiplier.round(2)) case format - when :short then "#{formatted_multiplier}#{@uom.to_s(format)}" - when :long then "#{formatted_multiplier} #{@uom.to_s(format, plural = (@multiplier > 1))}" + when :short then "#{formatted_multiplier}#{@uom.to_s(format: format)}" + when :long then "#{formatted_multiplier} #{@uom.to_s(format: format, pluralize: (@multiplier > 1))}" end end def ==(other) raise "Cannot compare Runby::Distance to #{other.class}" unless other.is_a? Distance