ruby_events 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ruby_events.rb +2 -2
- metadata +3 -3
data/lib/ruby_events.rb
CHANGED
@@ -9,7 +9,7 @@ module RubyEvents
|
|
9
9
|
class Events
|
10
10
|
# The current version of RubyEvents.
|
11
11
|
def self.version
|
12
|
-
'1.0.
|
12
|
+
'1.0.1'
|
13
13
|
end
|
14
14
|
|
15
15
|
# Initialize the events class by instantiating the class methods we'll be
|
@@ -23,7 +23,7 @@ module RubyEvents
|
|
23
23
|
def listen(event_type, procs = nil, &block)
|
24
24
|
@events[event_type] = [] unless event_is_defined(event_type)
|
25
25
|
procs_collected = []
|
26
|
-
if procs.respond_to?(:each)
|
26
|
+
if procs.respond_to?(:each) && procs.respond_to?(:to_a)
|
27
27
|
procs_collected += procs.to_a
|
28
28
|
elsif procs
|
29
29
|
procs_collected << procs
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nathan Kleyn
|