Skip to content

Commit

Permalink
Refer to Numeric extensions from Duration docs (#381)
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Tanagra <[email protected]>
  • Loading branch information
jimtng authored Jan 21, 2025
1 parent 95ac2a1 commit 2ffc02c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/openhab/core_ext/java/duration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ module CoreExt
module Java
Duration = java.time.Duration

#
# Extensions to {java.time.Duration Java Duration}
#
# Ruby's {Integer} and {Float} classes are extended to allow convenient creation of {Duration} instances.
#
# @example
# 5.seconds # => #<Duration PT5S>
# 2.5.hours # => #<Duration PT2H30M>
#
class Duration
include Between
# @!parse include TemporalAmount
Expand Down

0 comments on commit 2ffc02c

Please sign in to comment.