Class: GAI18n::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/gai18n/cli.rb

Defined Under Namespace

Classes: Parser

Instance Method Summary collapse

Instance Method Details

#run(argv) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/gai18n/cli.rb', line 31

def run(argv)
  if argv[0] == 'setup'
    setup openai_api_key: Parser.parse(argv).secret
  elsif argv[0] == 'translate'
    translate
  elsif argv[0] == 'assistant:create'
    assistant_create
  else
    Parser.parse(argv + ['-h'])
  end
end