Fix subscriber contract failure

This commit is contained in:
Thomas Reynolds 2015-05-04 10:45:03 -07:00
parent cee53d0f2d
commit 9d3c30ee53

View file

@ -49,7 +49,7 @@ module Middleman
Contract Or[Symbol, ArrayOf[Symbol]], Maybe[ArrayOf[Any]], Maybe[RespondTo[:instance_exec]] => Any Contract Or[Symbol, ArrayOf[Symbol]], Maybe[ArrayOf[Any]], Maybe[RespondTo[:instance_exec]] => Any
def execute(keys, args=[], scope=self) def execute(keys, args=[], scope=self)
callbacks_for(keys).each { |b| scope.instance_exec(*args, &b) } callbacks_for(keys).each { |b| scope.instance_exec(*args, &b) }
@subscribers.each { |b| scope.instance_exec(keys, *args, &b) } @subscribers.each { |b| scope.instance_exec(keys, args, &b) }
end end
Contract Or[Symbol, ArrayOf[Symbol]] => ::Hamster::Vector Contract Or[Symbol, ArrayOf[Symbol]] => ::Hamster::Vector