reactor 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reactor/models/concerns/eventable.rb +3 -3
- data/lib/reactor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0cceb129e794127e425a30e6c99b79133e8e4ff
|
4
|
+
data.tar.gz: 7c568995e6b466aedba39b7f646dfb7e895584ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12ee6c6f14b74ae21ec02d75e479b088e19f55ec02d0006caa94df6641513ccc59d10a30e97eb850ca6c42e5f9e5b433dd30797f57c9de6afc5765ab5b79957a
|
7
|
+
data.tar.gz: 374dbdd05e53475da24ed75ff2dc89ddb082baf841e209175c0d43e99fbb68ab0461c504f8ab88e8f4f2dc2f257c02b94c855bdd84a73aa969ef0682fbb485b6
|
@@ -24,18 +24,18 @@ module Reactor::Eventable
|
|
24
24
|
|
25
25
|
def schedule_events
|
26
26
|
self.class.events.each do |name, data|
|
27
|
-
|
27
|
+
event = data.merge(
|
28
28
|
at: ( data[:at] ? send(data[:at]) : nil), actor: self
|
29
29
|
).except(:watch)
|
30
30
|
need_to_fire = case (ifarg = data[:if])
|
31
31
|
when Proc
|
32
|
-
|
32
|
+
instance_exec &ifarg
|
33
33
|
when Symbol
|
34
34
|
send(ifarg)
|
35
35
|
else
|
36
36
|
true
|
37
37
|
end
|
38
|
-
Reactor::Event.delay.publish name,
|
38
|
+
Reactor::Event.delay.publish name, event if need_to_fire
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
data/lib/reactor/version.rb
CHANGED