Module: ModuleCluster::Suspend::WithoutHooks
- Includes:
- Hooks
- Included in:
- Define::Block::CascadingClass, Define::Block::CascadingClassOrModule, Define::Block::CascadingModule, Define::Block::CascadingModuleOrSubclass, Define::Block::Class, Define::Block::ClassOrInstance, Define::Block::ClassOrModule, Define::Block::ClassOrModuleOrInstance, Define::Block::ClassOrModuleOrSubclass, Define::Block::ClassOrSubclass, Define::Block::Instance, Define::Block::Module, Define::Block::ModuleOrInstance, Define::Block::ModuleOrSubclass, Define::Block::Subclass, Define::ClassCluster, Define::ClassOrInstanceCluster, Define::Cluster, Define::ClusterCascades, Define::ClusterCascadesToClass, Define::ClusterCascadesToModule, Define::InstanceCluster, Define::ModuleCluster, Define::ModuleOrClassCluster, Define::ModuleOrInstanceCluster, ModuleCluster::Suspend
- Defined in:
- lib/module-cluster.rb,
lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb
Instance Method Summary collapse
-
#without_any_extend_hooks(description = nil) ⇒ Object
without_any_extend_hooks #.
-
#without_any_hooks(description = nil) ⇒ Object
without_any_hooks #.
-
#without_any_include_hooks(description = nil) ⇒ Object
without_any_include_hooks #.
-
#without_extend_hooks(description = nil) ⇒ Object
without_extend_hooks #.
-
#without_include_hooks(description = nil) ⇒ Object
without_include_hooks #.
-
#without_prepend_extend_hooks(description = nil) ⇒ Object
without_prepend_extend_hooks #.
-
#without_prepend_include_hooks(description = nil) ⇒ Object
without_prepend_include_hooks #.
Methods included from Hooks
#all_extend_hooks_suspended?, #all_hooks_suspended?, #all_include_hooks_suspended?, #extend_hooks_suspended?, #hooks_suspended?, #include_hooks_suspended?, #prepend_extend_hooks_suspended?, #prepend_include_hooks_suspended?, #resume_any_extend_hooks, #resume_any_hooks, #resume_any_include_hooks, #resume_extend_hooks, #resume_include_hooks, #resume_prepend_extend_hooks, #resume_prepend_include_hooks, #suspend_any_extend_hooks, #suspend_any_hooks, #suspend_any_include_hooks, #suspend_extend_hooks, #suspend_include_hooks, #suspend_prepend_extend_hooks, #suspend_prepend_include_hooks
Instance Method Details
#without_any_extend_hooks(description = nil) ⇒ Object
without_any_extend_hooks #
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb', line 52 def without_any_extend_hooks( description = nil ) if description # we don't want to end up unsuspending any sets that were already suspended # so we add to the description only sets that are not suspended description[ :suspended ] = false sets = cluster_stack.all_extend_hooks.hooks_with( description ) sets.suspend yield sets.resume else cluster_stack.suspend_any_extend_hooks yield cluster_stack.resume_any_extend_hooks end return self end |
#without_any_hooks(description = nil) ⇒ Object
without_any_hooks #
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb', line 10 def without_any_hooks( description = nil ) if description # we don't want to end up unsuspending any sets that were already suspended # so we add to the description only sets that are not suspended description[ :suspended ] = false sets = cluster_stack.all_hooks.hooks_with( description ) sets.suspend yield sets.resume else cluster_stack.suspend_any_hooks yield cluster_stack.resume_any_hooks end return self end |
#without_any_include_hooks(description = nil) ⇒ Object
without_any_include_hooks #
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb', line 31 def without_any_include_hooks( description = nil ) if description # we don't want to end up unsuspending any sets that were already suspended # so we add to the description only sets that are not suspended description[ :suspended ] = false sets = cluster_stack.all_include_hooks.hooks_with( description ) sets.suspend yield sets.resume else cluster_stack.suspend_any_include_hooks yield cluster_stack.resume_any_include_hooks end return self end |
#without_extend_hooks(description = nil) ⇒ Object
without_extend_hooks #
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb', line 94 def without_extend_hooks( description = nil ) if description # we don't want to end up unsuspending any sets that were already suspended # so we add to the description only sets that are not suspended description[ :suspended ] = false sets = cluster_stack.extend_hooks.hooks_with( description ) sets.suspend yield sets.resume else cluster_stack.suspend_extend_hooks yield cluster_stack.resume_extend_hooks end return self end |
#without_include_hooks(description = nil) ⇒ Object
without_include_hooks #
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb', line 73 def without_include_hooks( description = nil ) if description # we don't want to end up unsuspending any sets that were already suspended # so we add to the description only sets that are not suspended description[ :suspended ] = false sets = cluster_stack.include_hooks.hooks_with( description ) sets.suspend yield sets.resume else cluster_stack.suspend_include_hooks yield cluster_stack.resume_include_hooks end return self end |
#without_prepend_extend_hooks(description = nil) ⇒ Object
without_prepend_extend_hooks #
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb', line 136 def without_prepend_extend_hooks( description = nil ) if description # we don't want to end up unsuspending any sets that were already suspended # so we add to the description only sets that are not suspended description[ :suspended ] = false sets = cluster_stack.prepend_extend_hooks.hooks_with( description ) sets.suspend yield sets.resume else cluster_stack.suspend_prepend_extend_hooks yield cluster_stack.resume_prepend_extend_hooks end return self end |
#without_prepend_include_hooks(description = nil) ⇒ Object
without_prepend_include_hooks #
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb', line 115 def without_prepend_include_hooks( description = nil ) if description # we don't want to end up unsuspending any sets that were already suspended # so we add to the description only sets that are not suspended description[ :suspended ] = false sets = cluster_stack.prepend_include_hooks.hooks_with( description ) sets.suspend yield sets.resume else cluster_stack.suspend_prepend_include_hooks yield cluster_stack.resume_prepend_include_hooks end return self end |