tario/define_method_handler — Issue #3: Nested groups, method handlers with multiple groups
Author: tario
Created: 2012-01-26 22:27:01+00:00
State: open

class Chain
handler_scope(:group => :a) do
handler_scope(:group => :b) do
define_method_handler(:foo) do
99
end
end
end
end

chain = Chain.new
chain.disable_handler_group(:a) do
chain.foo # nil
end

chain.disable_handler_group(:b) do
chain.foo # nil
end

chain.disable_handler_group(:default) do
chain.foo # nil
end