Skip to content

Commit

Permalink
Shorten some event bubbling code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Jun 18, 2009
1 parent 1c73b19 commit 88a8fad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/eventful.rb
Expand Up @@ -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)
Expand Down

0 comments on commit 88a8fad

Please sign in to comment.