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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 489e56f9a2fe2f2e158736a7a03708b99a26f422f5f3640755d4270b010530fb
4
- data.tar.gz: 4ccffffac019fd74bda95219dcdd0f126738da018d96f92f4f979a69171c915f
3
+ metadata.gz: 7789ba23937f06bb67047cbd521c7d92cc39d2de07d4e9fdf6537d86d06bfc32
4
+ data.tar.gz: 75a33c51386b1cff67e16c10de9f412bd9055389f4780be1b68a9d98409545a9
5
5
  SHA512:
6
- metadata.gz: d577c0e485492f29c72662a7ec16d15d2db88851ff194f460d754162290aa173d7304959805ef3bf6295001960d2a3dcc67111a34d6e0e56afea954cc3a5a759
7
- data.tar.gz: 47093891a302abe04e205584880f000664183ab1cd064a9d7eb145439b4a2bde37f3553520cf9dbf4ee86a68b3388e7d480ddac07b06f122c381bfc13ec2b9a4
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
@@ -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__
@@ -4,6 +4,6 @@ module OpenHAB
4
4
  module DSL
5
5
  # Version of openHAB helper libraries
6
6
  # @return [String]
7
- VERSION = "5.47.0"
7
+ VERSION = "5.47.1"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openhab-scripting
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.47.0
4
+ version: 5.47.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell