method
new
new(value, parts)
public
Hide source
# File activesupport/lib/active_support/duration.rb, line 209 def initialize(value, parts) #:nodoc: @value, @parts = value, parts.to_h @parts.default = 0 end