koine-event_manager 2.1 → 2.1.1

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: 264cee5964fb227323548961304f0a9110abb63da35ab855917a5b51076bd7b8
4
- data.tar.gz: f664cfc5d29d7a21e7ffaae1b8888416e98cc7cde592b5074cf017bb7612d330
3
+ metadata.gz: bfb4bada53604e54aa8118063adccfcc996e137c387ba967521a1af7c99828e1
4
+ data.tar.gz: b043883d06200820bba474a3191db5d4f6816c67be5f9f02a3a2c7c7852740bc
5
5
  SHA512:
6
- metadata.gz: 8a4bb7a37ef2eea3783aacc8800e609888bfaa0c481d86696b85d952b3a5180f0a5875b9c66c4a5eb23f67057b1cecddd003ab7a125fe90f31b2f1ba39d97477
7
- data.tar.gz: 1f60e42695cae9fa481d0ca6faa469c6bc59b0dd538a47d7987d9b01e7c016081672a436ef9cbba71db436b02b2f269a6962cbf0905fc87f0d8c8a6541eec91d
6
+ metadata.gz: 1b996259bb8fc3c71633fb6a314d0fe433825d4bfeedd6b444db9b2e8f59c4a9e27c5b521b951ca6b1b76071f603f28b3a2b5c48a6b93210ba0de4a985f2c22f
7
+ data.tar.gz: 3ad407c03c10a251c2dd2450095cc9714af03d194282075e98ba4bfae0610bb350004c057445142cbeeac78cfae305ff2f77d8a6d4f398b6b714f6b8ae6761a0
data/README.md CHANGED
@@ -94,8 +94,8 @@ end
94
94
 
95
95
  subscriber = MySubscriber.new
96
96
 
97
- event_manager.subscribe(subscriber, to: UserListener)
98
- event_manager.unsubscribe(subscriber, from: UserListener)
97
+ event_manager.subscribe(subscriber, to: UserSignedIn)
98
+ event_manager.unsubscribe(subscriber, from: UserSignedIn)
99
99
  ```
100
100
 
101
101
  ## Development
@@ -16,6 +16,7 @@ module Koine
16
16
  def subscribe(subscriber, to:)
17
17
  @subscribers[subscriber] ||= []
18
18
  @subscribers[subscriber] << to
19
+ @subscribers[subscriber] = @subscribers[subscriber].flatten.map(&:to_s).uniq
19
20
  end
20
21
 
21
22
  def unsubscribe(subscriber, from:)
@@ -53,10 +54,6 @@ module Koine
53
54
  listeners[event_type.to_s] << block
54
55
  end
55
56
 
56
- def key_for(object_or_class)
57
- object_or_class.to_s
58
- end
59
-
60
57
  attr_reader :listeners
61
58
  attr_reader :subscribers
62
59
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Koine
4
4
  module EventManager
5
- VERSION = '2.1'
5
+ VERSION = '2.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koine-event_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.1'
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Jacobus
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-20 00:00:00.000000000 Z
11
+ date: 2018-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler