lib/duration_format.rb in remain_timer-0.2.3 vs lib/duration_format.rb in remain_timer-0.3.0

- old
+ new

@@ -9,10 +9,12 @@ hour: SECONDS_PER_HOUR, day: SECONDS_PER_DAY, }.freeze def self.build_parts(value) + # @type var parts: { day: Integer, hour: Integer, min: Integer, sec: Float } parts = {} + # @type var remainder: Integer | Float remainder = value.to_f PARTS.each do |part| next if part == :sec part_in_seconds = PARTS_IN_SECONDS[part]