openhab-scripting 5.47.0 → 5.47.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/abstract_uid.rb +11 -0
- data/lib/openhab/core/proxy.rb +14 -0
- 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: 7789ba23937f06bb67047cbd521c7d92cc39d2de07d4e9fdf6537d86d06bfc32
|
|
4
|
+
data.tar.gz: 75a33c51386b1cff67e16c10de9f412bd9055389f4780be1b68a9d98409545a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7f5e8fcf1a0bbf52d9af80e9de6a6552c319c259d62ed7ae42cae373da1356e09236ee29687f479678849e5c49a6d7d65eac40d7f5e7505a88745c800a6d7fe
|
|
7
|
+
data.tar.gz: 7171205645a97d3bb6e2fbfc089f103d2e0be94c7f77eb02d1667b06b5812f223750d147a97ae0313903079c65ecaedc8074ed129ffca2b91e34e1eda0c33b22
|
|
@@ -6,6 +6,8 @@ module OpenHAB
|
|
|
6
6
|
|
|
7
7
|
# A non specific base class for unique identifiers.
|
|
8
8
|
class AbstractUID
|
|
9
|
+
extend Forwardable
|
|
10
|
+
|
|
9
11
|
# implicit conversion to string
|
|
10
12
|
alias_method :to_str, :to_s
|
|
11
13
|
# inspect result is just the string representation
|
|
@@ -18,6 +20,15 @@ module OpenHAB
|
|
|
18
20
|
|
|
19
21
|
to_s == other
|
|
20
22
|
end
|
|
23
|
+
|
|
24
|
+
def_delegators :to_s,
|
|
25
|
+
:start_with?,
|
|
26
|
+
:end_with?,
|
|
27
|
+
:include?,
|
|
28
|
+
:match,
|
|
29
|
+
:match?,
|
|
30
|
+
:=~,
|
|
31
|
+
:length
|
|
21
32
|
end
|
|
22
33
|
|
|
23
34
|
# have to remove == from all descendant classes so that they'll inherit
|
data/lib/openhab/core/proxy.rb
CHANGED
|
@@ -251,6 +251,20 @@ module OpenHAB
|
|
|
251
251
|
!(self == other) # rubocop:disable Style/InverseMethods
|
|
252
252
|
end
|
|
253
253
|
|
|
254
|
+
#
|
|
255
|
+
# Check if delegates are case-like
|
|
256
|
+
#
|
|
257
|
+
# Otherwise items can't be used in Ruby case statements
|
|
258
|
+
#
|
|
259
|
+
# @return [true, false]
|
|
260
|
+
#
|
|
261
|
+
# @!visibility private
|
|
262
|
+
def ===(other)
|
|
263
|
+
return __getobj__ === other.__getobj__ if other.instance_of?(@klass) # rubocop:disable Style/CaseEquality
|
|
264
|
+
|
|
265
|
+
super
|
|
266
|
+
end
|
|
267
|
+
|
|
254
268
|
# @return [String]
|
|
255
269
|
def to_s
|
|
256
270
|
target = __getobj__
|
data/lib/openhab/dsl/version.rb
CHANGED