Class: Itamae::HandlerProxy
- Inherits:
-
Object
- Object
- Itamae::HandlerProxy
- Defined in:
- lib/itamae/handler_proxy.rb
Instance Method Summary collapse
- #event(*args, &block) ⇒ Object
-
#initialize ⇒ HandlerProxy
constructor
A new instance of HandlerProxy.
- #register_instance(instance) ⇒ Object
Constructor Details
#initialize ⇒ HandlerProxy
Returns a new instance of HandlerProxy.
3 4 5 |
# File 'lib/itamae/handler_proxy.rb', line 3 def initialize @instances = [] end |
Instance Method Details
#event(*args, &block) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/itamae/handler_proxy.rb', line 11 def event(*args, &block) if block_given? _event_with_block(*args, &block) else _event(*args) end end |
#register_instance(instance) ⇒ Object
7 8 9 |
# File 'lib/itamae/handler_proxy.rb', line 7 def register_instance(instance) @instances << instance end |