Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Shorten some event bubbling code.

  • Loading branch information...
commit 88a8fad8b7bdd1bdfc5a2d931c6ab3f693404704 1 parent 1c73b19
@jcoglan authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/eventful.rb
View
4 lib/eventful.rb
@@ -57,9 +57,7 @@ def fire(*args)
changed(true)
args[0] = {:receiver => receiver}
- self.class.ancestors.each do |klass|
- klass.fire(*args) if Eventful === klass
- end
+ self.class.ancestors.grep(Eventful).each &it.fire(*args)
end
def self.included(base)
Please sign in to comment.
Something went wrong with that request. Please try again.