openhab-scripting 2.19.3 → 2.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92d53929fa49d74df4409422669c809e146723ef88862019ee77dbf8f671b2e0
4
- data.tar.gz: 3d421f3dd17058b3319bf1973da3c39f4dcc74b1a04ac365b1361be0afb59ab8
3
+ metadata.gz: '08f9a551904b3396bb8f7944c5eb239250b00f68309f53c23e98203bd440ec85'
4
+ data.tar.gz: 8089ce9cc9fe7aea8d0b7e6c0f3ec8b7b298cd5584e4a1d2ec0c9ae6deb6583f
5
5
  SHA512:
6
- metadata.gz: ef748b3b0b3f7e4e85a7b2523df44101ceb64c9170358e5521fb2601880aefd5fd789c71d88c2115b339323081013e53032daf7e1b7e25ffda9010493da9cbec
7
- data.tar.gz: 7468514e99d37e180e694b07ef751c5f9badf56dbc94f43e9ed982c9a7799760c37940dfaaa5c0adaecbfb3d82505a184401bad565ab88c56c0401207c3f2176
6
+ metadata.gz: 44a0c0387d5e738a33a108448c5b2d4f6bd0b6e09769690e072d6a370e8bd044e4d7dade6773e5afc70c0a78be74b223b70dbb63b13dfc720b0ad9ee15d98546
7
+ data.tar.gz: 7415332d0525749b1d50d53ee8dfa3829a4f9ee51d308f9d2d4808279260c1bc5eda212d2c0714bace5d0cd25e8bf2159f115ba2d2b8382d365b557d2e4a8dbb
@@ -134,6 +134,18 @@ module OpenHAB
134
134
  end
135
135
  end
136
136
 
137
+ #
138
+ # Implements Hash#dig-like functionaity to metadata
139
+ #
140
+ # @param [String] key The first key
141
+ # @param [Array<String, Symbol>] keys More keys to dig deeper
142
+ #
143
+ # @return [OpenHAB::DSL::MonkeyPatch::Items::MetadataItem], or nil if the namespace doesn't exist
144
+ #
145
+ def dig(key, *keys)
146
+ keys.empty? ? self[key]&.value : self[key]&.dig(*keys)
147
+ end
148
+
137
149
  #
138
150
  # Enumerates through all the namespaces
139
151
  #
@@ -5,5 +5,5 @@
5
5
  #
6
6
  module OpenHAB
7
7
  # @return [String] Version of OpenHAB helper libraries
8
- VERSION = '2.19.3'
8
+ VERSION = '2.20.0'
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: 2.19.3
4
+ version: 2.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell