mirror of https://github.com/rails/rails
Merge pull request #50810 from m-nakamura145/activesupport/duration-parts-example
Add example to parts documentation [ci-skip]
This commit is contained in:
commit
25d03be267
|
@ -234,7 +234,10 @@ module ActiveSupport
|
|||
end
|
||||
end
|
||||
|
||||
# Returns a copy of the parts hash that defines the duration
|
||||
# Returns a copy of the parts hash that defines the duration.
|
||||
#
|
||||
# 5.minutes.parts # => {:minutes=>5}
|
||||
# 3.years.parts # => {:years=>3}
|
||||
def parts
|
||||
@parts.dup
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue