Class: Gloo::Exec::Runner
- Inherits:
-
Object
- Object
- Gloo::Exec::Runner
- Defined in:
- lib/gloo/exec/runner.rb
Class Method Summary collapse
-
.go(verb) ⇒ Object
Dispatch run command to a verb.
-
.run(path_name) ⇒ Object
Send ‘run’ message to the object.
Class Method Details
.go(verb) ⇒ Object
Dispatch run command to a verb. We abstract this out in case there are things that need to be done before or after a verb is done running.
18 19 20 21 22 23 24 25 |
# File 'lib/gloo/exec/runner.rb', line 18 def self.go( verb ) $log.debug "running verb #{verb.type_display}" $engine.heap.error.start_tracking $engine.exec_env.verbs.push verb verb&.run $engine.exec_env.verbs.pop $engine.heap.error.clear_if_no_errors end |
.run(path_name) ⇒ Object
Send ‘run’ message to the object. Resolve the path_name and then send the run message.
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/gloo/exec/runner.rb', line 31 def self.run( path_name ) $log.debug "running script at #{path_name}" pn = Gloo::Core::Pn.new path_name o = pn.resolve if o o. 'run' else $log.error "Could not send message to object. Bad path: #{path_name}" end end |