openhab-scripting 4.27.1 → 4.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openhab/dsl/timers/manager.rb +14 -1
- data/lib/openhab/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 738583da2cd48296525b6b6a2999fe1daba82b0cbb1c410beb7e3575fdf6afbb
|
4
|
+
data.tar.gz: e7d4ff645268380636f69bff6eec42d8b8f650784225afe9d456027b44e11d77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e06a080cedde9ffbb29983f087c93dff1533fe521112c1036015c1f42f93c5a9d164bd0c307d21109c8f3a6abe7cb74e0f63b144cd21d2f7086a1e03d0b9c545
|
7
|
+
data.tar.gz: e23ccc89ee67bc2152efaa91ff33157c74d99d244da3cc11b497b8500b094f40dfc66b61fcb04c18763fe53afaabccba8baa6f2bf05c9f3d5d194915255f8078
|
@@ -39,7 +39,7 @@ module OpenHAB
|
|
39
39
|
|
40
40
|
if timer.respond_to? :id
|
41
41
|
logger.trace("Adding #{timer} with id #{timer.id.inspect} timer ids")
|
42
|
-
@timer_ids[timer.id] =
|
42
|
+
@timer_ids[timer.id] = TimerSet.new unless @timer_ids[timer.id]
|
43
43
|
@timer_ids[timer.id] << timer
|
44
44
|
end
|
45
45
|
|
@@ -87,6 +87,19 @@ module OpenHAB
|
|
87
87
|
@timers.clear
|
88
88
|
end
|
89
89
|
end
|
90
|
+
|
91
|
+
#
|
92
|
+
# Provide additional methods for the timers set
|
93
|
+
#
|
94
|
+
class TimerSet < Set
|
95
|
+
#
|
96
|
+
# A shorthand to cancel all the timer objects held within the set
|
97
|
+
# so that timers[timer_id].cancel_all is equivalent to timers[timer_id].each(&:cancel)
|
98
|
+
#
|
99
|
+
def cancel_all
|
100
|
+
each(&:cancel)
|
101
|
+
end
|
102
|
+
end
|
90
103
|
end
|
91
104
|
end
|
92
105
|
end
|
data/lib/openhab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openhab-scripting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|