Class: Ace::Sim::CLI::Commands::Run
- Inherits:
-
Ace::Support::Cli::Command
- Object
- Ace::Support::Cli::Command
- Ace::Sim::CLI::Commands::Run
- Includes:
- Ace::Support::Cli::Base
- Defined in:
- lib/ace/sim/cli/commands/run.rb
Instance Method Summary collapse
- #call(**options) ⇒ Object
-
#initialize(runner: nil) ⇒ Run
constructor
A new instance of Run.
Constructor Details
#initialize(runner: nil) ⇒ Run
Returns a new instance of Run.
24 25 26 27 |
# File 'lib/ace/sim/cli/commands/run.rb', line 24 def initialize(runner: nil) super() @runner = runner end |
Instance Method Details
#call(**options) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ace/sim/cli/commands/run.rb', line 29 def call(**) session = build_session() result = runner.run(session) unless [:quiet] puts "Run ID: #{result[:run_id]}" puts "Run Dir: #{result[:run_dir]}" puts "Status: #{result[:status]}" end return if result[:success] raise Ace::Support::Cli::Error.new(result[:error] || "Simulation failed") end |