Module: Symbiont::Executor
- Defined in:
- lib/symbiont/executor.rb
Overview
Mediator service object that controls the logic of creating triggers and calling them. Acts as a factory for trigerrs and an execution-mediator for procs.
Class Method Summary collapse
-
.evaluate(*required_contexts, context_direction: Trigger::IOK, &closure) ⇒ Object
Starts execution of a proc object in the context of the passed object with the selected direction of method dispatching.
-
.evaluate_private(*required_contexts, context_direction: Trigger::IOK, &closure) ⇒ Object
Starts execution of a proc object in the context of the passed object with the selected direction of method dispatching.
-
.private_method(method_name, *required_contexts, context_direction: Trigger::IOK, &closure) ⇒ Method
Gets the method object taken from the context that can respond to it.
-
.public_method(method_name, *required_contexts, context_direction: Trigger::IOK, &closure) ⇒ Method
Gets the method object taken from the context that can respond to it.
Class Method Details
.evaluate(*required_contexts, context_direction: Trigger::IOK, &closure) ⇒ Object
Starts execution of a proc object in the context of the passed object with the selected direction of method dispatching. Delegates execution to a public trigger.
34 35 36 37 |
# File 'lib/symbiont/executor.rb', line 34 def evaluate(*required_contexts, context_direction: Trigger::IOK, &closure) Isolator.new(default_direction: context_direction, &closure) .evaluate(*required_contexts) end |
.evaluate_private(*required_contexts, context_direction: Trigger::IOK, &closure) ⇒ Object
Starts execution of a proc object in the context of the passed object with the selected direction of method dispatching. Delegates execution to a private trigger.
62 63 64 65 |
# File 'lib/symbiont/executor.rb', line 62 def evaluate_private(*required_contexts, context_direction: Trigger::IOK, &closure) Isolator.new(default_direction: context_direction, &closure) .evaluate_private(*required_contexts) end |
.private_method(method_name, *required_contexts, context_direction: Trigger::IOK, &closure) ⇒ Method
Gets the method object taken from the context that can respond to it. Considers private methods and public methods.
118 119 120 121 |
# File 'lib/symbiont/executor.rb', line 118 def private_method(method_name, *required_contexts, context_direction: Trigger::IOK, &closure) Isolator.new(default_direction: context_direction, &closure) .private_method(method_name, *required_contexts) end |
.public_method(method_name, *required_contexts, context_direction: Trigger::IOK, &closure) ⇒ Method
Gets the method object taken from the context that can respond to it. Considers only public methods.
90 91 92 93 |
# File 'lib/symbiont/executor.rb', line 90 def public_method(method_name, *required_contexts, context_direction: Trigger::IOK, &closure) Isolator.new(default_direction: context_direction, &closure) .public_method(method_name, *required_contexts) end |