u-observers 0.5.0 → 0.6.0

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: 2268ebc8924bf446ca73f3b1fbdb0cb4a8fba9f60eb01173e68fa7486747b1ed
4
- data.tar.gz: 329fad95d53450a550c9fc964fec4bb3732f5a63d684835f0ef6d766df839d15
3
+ metadata.gz: ee142231055e893f34d726e7bbf57b5fd27da851e49c63a5a33a3dcf6a000abe
4
+ data.tar.gz: 5ca62a10c247a02435622b8190114f45c8e28be50f9a5e8e8dd5f21c42a99c2c
5
5
  SHA512:
6
- metadata.gz: d3a2f1895221f171ca6499bca6284a9d349e77b9d6661b41a0b15c662d9f400af86d7d0b77e4331ca9a985b6db2d6628415be5422944cb09aba32d676aa537eb
7
- data.tar.gz: 82daa067cd2cf85c3b00c0aca546131e38c1ee365336d5f01cb868b81d7b91be806ecb606c61ad5e56d2364f9341f8636d093f02d6b6f424ddccc0702b11f7e7
6
+ metadata.gz: c8bb160a235375a6a99c2c379413b79952ac85492211feb08dc77e0435e7e87aef3edc5c68bed81b16364a5197615321ea3a894c6bbad9143c831fb63f781fdd
7
+ data.tar.gz: c861884ac244f036a9ab78edce25cf857fed41afcf18467354dd784e27728921b3a6c61695cbbf86ae3d0bef2ad71a2364e84bed2d9b6f6f33d27bae810ab0cf
@@ -47,22 +47,24 @@ module Micro
47
47
  end
48
48
 
49
49
  def notify(*events)
50
- EventsOrActions[events].each { |act| notify!(act) }
50
+ broadcast(EventsOrActions[events])
51
51
 
52
52
  self
53
53
  end
54
54
 
55
55
  def call(options = Utils::EMPTY_HASH)
56
- EventsOrActions.fetch_actions(options).each { |act| notify!(act) }
56
+ broadcast(EventsOrActions.fetch_actions(options))
57
57
 
58
58
  self
59
59
  end
60
60
 
61
61
  private
62
62
 
63
- def notify!(evt_or_act)
64
- @list.each do |strategy, observer, data|
65
- call!(observer, strategy, data, with: evt_or_act)
63
+ def broadcast(evts_or_acts)
64
+ evts_or_acts.each do |evt_or_act|
65
+ @list.each do |strategy, observer, data|
66
+ call!(observer, strategy, data, with: evt_or_act)
67
+ end
66
68
  end
67
69
  end
68
70
 
@@ -1,5 +1,5 @@
1
1
  module Micro
2
2
  module Observers
3
- VERSION = '0.5.0'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: u-observers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Serradura