method
new
new(value, parts)
public
Hide source
# File activesupport/lib/active_support/duration.rb, line 210 def initialize(value, parts) #:nodoc: @value, @parts = value, parts.to_h @parts.default = 0 @parts.reject! { |k, v| v.zero? } end