Class: Raif::CLI::Runner
- Inherits:
-
Object
- Object
- Raif::CLI::Runner
- Defined in:
- lib/raif/cli.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(args) ⇒ Runner
Returns a new instance of Runner.
17 18 19 20 |
# File 'lib/raif/cli.rb', line 17 def initialize(args) @args = args @command = args.shift end |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/raif/cli.rb', line 22 def run case @command when "evals" Evals.new(@args).run when "evals:setup" EvalsSetup.new(@args).run when "version", "--version", "-v" show_version when "help", "--help", "-h", nil show_help else puts "Unknown command: #{@command}" puts "" show_help exit 1 end end |