Class: Module::Cluster::InstanceController::MultipleHookControllerProxy
- Inherits:
-
Object
- Object
- Module::Cluster::InstanceController::MultipleHookControllerProxy
- Defined in:
- lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb
Overview
Proxies before include or extend definitions to both include and extend controllers.
Instance Attribute Summary collapse
-
#Hook Controllers this Proxy proxies.(ControllersthisProxyproxies.) ⇒ Array<Module::Cluster::InstanceController::HookController>
readonly
Hook Controllers this Proxy proxies.
-
#hook_controllers ⇒ Array<Module::Cluster::InstanceController::HookController>
readonly
Hook Controllers this Proxy proxies.
-
#name ⇒ Symbol, String
readonly
Name of hook controller.
Instance Method Summary collapse
-
#action {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that action should be performed at event hook.
-
#before_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
Declare that chained actions should be inserted into the event stack after the location in the same event stack where provided module(s) are specified to be extended.
-
#before_include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
Declare that chained actions should be inserted into the event stack after the location in the same event stack where provided module(s) are specified to be included.
-
#before_include_or_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
(also: #after_extend_or_include)
Declare that chained actions should be inserted into the event stack after the location in the same event stack where provided module(s) are specified to be included or extended.
-
#before_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
Declare that chained actions should be inserted into the event stack prior to the location in the same event stack where provided module(s) are specified to be extended.
-
#before_include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
Declare that chained actions should be inserted into the event stack prior to the location in the same event stack where provided module(s) are specified to be included.
-
#before_include_or_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
(also: #before_extend_or_include)
Declare that chained actions should be inserted into the event stack prior to the location in the same event stack where provided module(s) are specified to be included or extended.
-
#chain_proxy ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Get Chain Proxy instance used by this Multiple Hook Controller Proxy.
-
#extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that modules should be extended at event hook.
-
#extend_and_include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that modules should be extended and included at event hook.
-
#include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that modules should be included at event hook.
-
#include_and_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that modules should be included and extended at event hook.
-
#initialize(name, *hook_controllers) ⇒ MultipleHookControllerProxy
constructor
A new instance of MultipleHookControllerProxy.
Constructor Details
#initialize(name, *hook_controllers) ⇒ MultipleHookControllerProxy
Returns a new instance of MultipleHookControllerProxy.
18 19 20 21 22 23 24 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 18 def initialize( name, *hook_controllers ) @name = name @hook_controllers = hook_controllers end |
Instance Attribute Details
#Hook Controllers this Proxy proxies.(ControllersthisProxyproxies.) ⇒ Array<Module::Cluster::InstanceController::HookController> (readonly)
Returns Hook Controllers this Proxy proxies.
357 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 357 attr_reader :hook_controllers |
#hook_controllers ⇒ Array<Module::Cluster::InstanceController::HookController> (readonly)
Returns Hook Controllers this Proxy proxies.
357 358 359 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 357 def hook_controllers @hook_controllers end |
#name ⇒ Symbol, String (readonly)
Name of hook controller.
344 345 346 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 344 def name @name end |
Instance Method Details
#action {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that action should be performed at event hook.
147 148 149 150 151 152 153 154 155 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 147 def action( & block ) @hook_controllers.each do |this_hook_controller| this_hook_controller.action( & block ) end return self end |
#before_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
Declare that chained actions should be inserted into the event stack after the location
in the same event stack where provided module(s) are specified to be extended.
274 275 276 277 278 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 274 def after_extend( *modules, & block ) return chain_proxy.after_extend( *modules, & block ) end |
#before_include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
Declare that chained actions should be inserted into the event stack after the location
in the same event stack where provided module(s) are specified to be included.
250 251 252 253 254 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 250 def after_include( *modules, & block ) return chain_proxy.after_include( *modules, & block ) end |
#before_include_or_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy Also known as: after_extend_or_include
Declare that chained actions should be inserted into the event stack after the location
in the same event stack where provided module(s) are specified to be included or extended.
299 300 301 302 303 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 299 def after_include_or_extend( *modules, & block ) return chain_proxy.after_include_or_extend( *modules, & block ) end |
#before_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
Declare that chained actions should be inserted into the event stack prior to the location
in the same event stack where provided module(s) are specified to be extended.
175 176 177 178 179 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 175 def before_extend( *modules, & block ) return chain_proxy.before_extend( *modules, & block ) end |
#before_include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy
Declare that chained actions should be inserted into the event stack prior to the location
in the same event stack where provided module(s) are specified to be included.
199 200 201 202 203 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 199 def before_include( *modules, & block ) return chain_proxy.before_include( *modules, & block ) end |
#before_include_or_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController::ChainProxy Also known as: before_extend_or_include
Declare that chained actions should be inserted into the event stack prior to the location
in the same event stack where provided module(s) are specified to be included or extended.
224 225 226 227 228 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 224 def before_include_or_extend( *modules, & block ) return chain_proxy.before_include_or_extend( *modules, & block ) end |
#chain_proxy ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Get Chain Proxy instance used by this Multiple Hook Controller Proxy.
327 328 329 330 331 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 327 def chain_proxy return @chain_proxy ||= self.class::ChainProxy.new( self ) end |
#extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that modules should be extended at event hook.
70 71 72 73 74 75 76 77 78 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 70 def extend( *modules, & block ) @hook_controllers.each do |this_hook_controller| this_hook_controller.extend( *modules, & block ) end return self end |
#extend_and_include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that modules should be extended and included at event hook. Order is reversed from #include_and_extend.
124 125 126 127 128 129 130 131 132 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 124 def extend_and_include( *modules, & block ) @hook_controllers.each do |this_hook_controller| this_hook_controller.extend_and_include( *modules, & block ) end return self end |
#include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that modules should be included at event hook.
43 44 45 46 47 48 49 50 51 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 43 def include( *modules, & block ) @hook_controllers.each do |this_hook_controller| this_hook_controller.include( *modules, & block ) end return self end |
#include_and_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::HookController
Declare that modules should be included and extended at event hook. See also #extend_and_include.
97 98 99 100 101 102 103 104 105 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb', line 97 def include_and_extend( *modules, & block ) @hook_controllers.each do |this_hook_controller| this_hook_controller.include_and_extend( *modules, & block ) end return self end |