Class: Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
- Inherits:
-
Object
- Object
- Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
- Defined in:
- lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb
Overview
A MultipleHookControllerProxy uses a MultipleHookControllerProxy::ChainProxy
to chain commands that rely on chained state.
Instance Attribute Summary collapse
-
#Multiple Hook Controller Proxy for which this instance is operative as a chaining proxy(HookControllerProxy) ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy
readonly
Parent Multiple Hook Controller Proxy.
-
#parent_multiple_hook_controller_proxy ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy
readonly
Parent Multiple Hook Controller Proxy.
- #proxies ⇒ Array<Module::Cluster::InstanceController::HookController::ChainProxy> readonly
- #Proxies for which this instance is operative as a chaining proxy. ⇒ Array<Module::Cluster::InstanceController::HookController::ChainProxy> readonly
Instance Method Summary collapse
-
#action {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that action should be performed at event hook in the context specified this chained declaration.
-
#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.
-
#cascade(context, ...) {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
(also: #cascade_to)
Declare contexts to which declarations made from this declaration chain should cascade.
-
#cluster_name(cluster_name) ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Set cluster name for which chained actions will be inserted in stack.
-
#context(context, ...) ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Set index where chained actions will be inserted in stack.
-
#extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that modules should be extended at event hook in the context specified this chained declaration.
-
#extend_and_include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that modules should be extended and included at event hook in the context specified this chained declaration.
-
#include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that modules should be included at event hook in the context specified this chained declaration.
-
#include_and_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that modules should be included and extended at event hook in the context specified this chained declaration.
-
#initialize(parent_multiple_hook_controller_proxy) ⇒ ChainProxy
constructor
A new instance of ChainProxy.
Constructor Details
#initialize(parent_multiple_hook_controller_proxy) ⇒ ChainProxy
Returns a new instance of ChainProxy.
17 18 19 20 21 22 23 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 17 def initialize( parent_multiple_hook_controller_proxy ) @parent_multiple_hook_controller_proxy = parent_multiple_hook_controller_proxy @proxies = @parent_multiple_hook_controller_proxy.hook_controllers.collect( & :chain_proxy ) end |
Instance Attribute Details
#Multiple Hook Controller Proxy for which this instance is operative as a chaining proxy(HookControllerProxy) ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy (readonly)
Returns Parent Multiple Hook Controller Proxy.
406 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 406 attr_reader :parent_multiple_hook_controller_proxy |
#parent_multiple_hook_controller_proxy ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy (readonly)
Returns Parent Multiple Hook Controller Proxy.
406 407 408 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 406 def parent_multiple_hook_controller_proxy @parent_multiple_hook_controller_proxy end |
#proxies ⇒ Array<Module::Cluster::InstanceController::HookController::ChainProxy> (readonly)
419 420 421 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 419 def proxies @proxies end |
#Proxies for which this instance is operative as a chaining proxy. ⇒ Array<Module::Cluster::InstanceController::HookController::ChainProxy> (readonly)
419 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 419 attr_reader :proxies |
Instance Method Details
#action {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that action should be performed at event hook in the context
specified this chained declaration.
149 150 151 152 153 154 155 156 157 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 149 def action( & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.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.
322 323 324 325 326 327 328 329 330 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 322 def after_extend( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.after_extend( *modules, & block ) end return self 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.
294 295 296 297 298 299 300 301 302 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 294 def after_include( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.after_include( *modules, & block ) end return self 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.
351 352 353 354 355 356 357 358 359 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 351 def after_include_or_extend( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.after_include_or_extend( *modules, & 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 prior to the location
in the same event stack where provided module(s) are specified to be extended.
207 208 209 210 211 212 213 214 215 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 207 def before_extend( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.before_extend( *modules, & block ) end return self 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.
235 236 237 238 239 240 241 242 243 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 235 def before_include( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.before_include( *modules, & block ) end return self 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.
264 265 266 267 268 269 270 271 272 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 264 def before_include_or_extend( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.before_include_or_extend( *modules, & block ) end return self end |
#cascade(context, ...) {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy Also known as: cascade_to
Declare contexts to which declarations made from this declaration chain should cascade.
177 178 179 180 181 182 183 184 185 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 177 def cascade( *cascade_contexts, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.cascade( *cascade_contexts, & block ) end return self end |
#cluster_name(cluster_name) ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Set cluster name for which chained actions will be inserted in stack.
432 433 434 435 436 437 438 439 440 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 432 def cluster_name( cluster_name ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.cluster_name( cluster_name ) end return self end |
#context(context, ...) ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Set index where chained actions will be inserted in stack.
376 377 378 379 380 381 382 383 384 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 376 def context( *contexts ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.context( *contexts ) end return self end |
#extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that modules should be extended at event hook in the context specified this chained declaration.
69 70 71 72 73 74 75 76 77 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 69 def extend( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.extend( *modules, & block ) end return self end |
#extend_and_include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that modules should be extended and included at event hook in the context
specified this chained declaration. Order is reversed from #include_and_extend.
125 126 127 128 129 130 131 132 133 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 125 def extend_and_include( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.extend_and_include( *modules, & block ) end return self end |
#include {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that modules should be included at event hook in the context specified this chained declaration.
42 43 44 45 46 47 48 49 50 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 42 def include( *modules ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.include( *modules ) end return self end |
#include_and_extend {|hooked_instance| ... } ⇒ Module::Cluster::InstanceController::MultipleHookControllerProxy::ChainProxy
Declare that modules should be included and extended at event hook in the context
specified this chained declaration. See also #extend_and_include.
97 98 99 100 101 102 103 104 105 |
# File 'lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb', line 97 def include_and_extend( *modules, & block ) @proxies.each do |this_hook_controller_chain_proxy| this_hook_controller_chain_proxy.include_and_extend( *modules, & block ) end return self end |