openhab-scripting 5.44.0 → 5.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/openhab/core_ext/ruby/date.rb +13 -5
- data/lib/openhab/dsl/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd60fb96afbab0b86a01d0cbfce296604179e63899be95d6faefdc27e805dfe5
|
|
4
|
+
data.tar.gz: 88a9935ff405de0fef0cf645e936ea521fe940c88a8e40da6069183476019c00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8851a00c95338d7797062a7d901a763146ee96f4a8f652b3a30b380c5248961b3f418661c2cd2b899d292a7077723bbca818e778223996a98165b84a35c6cab6
|
|
7
|
+
data.tar.gz: 4ff6ccb08cb630373a385daec0bbb9accf3ec13358e373942fea74fb2f95c0b8f489a22f0de7b37f52765611a7ca6a921f743e1e57b7d3adf57e78fe2f362e1e
|
|
@@ -83,9 +83,17 @@ class Date
|
|
|
83
83
|
to_zoned_date_time(context).to_instant
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
# @!parse
|
|
87
|
+
# # Extends {#<=>} to allow comparison with {java.time.MonthDay MonthDay}
|
|
88
|
+
# # @return [Integer, nil]
|
|
89
|
+
# def compare_with_coercion(other)
|
|
90
|
+
# end
|
|
91
|
+
# alias_method :<=>, :compare_with_coercion
|
|
92
|
+
|
|
93
|
+
# @!visibility private
|
|
86
94
|
# @return [Integer, nil]
|
|
87
|
-
def
|
|
88
|
-
return
|
|
95
|
+
def oh_compare_with_coercion(other)
|
|
96
|
+
return oh_compare_without_coercion(other) if other.is_a?(self.class)
|
|
89
97
|
|
|
90
98
|
return self <=> other.to_date(self) if other.is_a?(java.time.MonthDay)
|
|
91
99
|
|
|
@@ -93,10 +101,10 @@ class Date
|
|
|
93
101
|
return lhs <=> rhs
|
|
94
102
|
end
|
|
95
103
|
|
|
96
|
-
|
|
104
|
+
oh_compare_without_coercion(other)
|
|
97
105
|
end
|
|
98
|
-
alias_method :
|
|
99
|
-
alias_method :<=>, :
|
|
106
|
+
alias_method :oh_compare_without_coercion, :<=>
|
|
107
|
+
alias_method :<=>, :oh_compare_with_coercion
|
|
100
108
|
|
|
101
109
|
#
|
|
102
110
|
# Convert `other` to Date, if possible.
|
data/lib/openhab/dsl/version.rb
CHANGED