Class: Herve::CLI::RubyCommands::Run
- Inherits:
-
BaseCommand
- Object
- Dry::CLI::Command
- BaseCommand
- Herve::CLI::RubyCommands::Run
- Defined in:
- lib/herve/cli/ruby_commands/run.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
Methods inherited from BaseCommand
Instance Method Details
#call(version:, **args) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/herve/cli/ruby_commands/run.rb', line 10 def call(version:, **args) ruby = RubyCommands.find_ruby(config, version) env = Config.env_for(ruby) raise Herve::Ruby::RequestError, "no version #{request} installed" if ruby.nil? cmd = [ruby.executable_path.to_s] + args[:args] Kernel.exec(env, *cmd) end |