Class: EDango::Executor
Instance Method Summary collapse
-
#initialize ⇒ Executor
constructor
A new instance of Executor.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Executor
Returns a new instance of Executor.
22 23 24 25 |
# File 'lib/edango/executor.rb', line 22 def initialize @environment = SERVICES[:environment] @tasks = @environment.tasks end |
Instance Method Details
#run ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/edango/executor.rb', line 27 def run if @tasks[:show_version] output_version() elsif @tasks[:show_help] output_help() else begin fake_stderr SERVICES[:logger] do SERVICES[:core].run!() end rescue Exception => e @environment.log_error(e, 'Core failure') end end end |