Class: OmniAI::CLI::EmbedHandler

Inherits:
BaseHandler show all
Defined in:
lib/omniai/cli/embed_handler.rb

Overview

Used for CLI usage of ‘omnia embed’.

Instance Method Summary collapse

Methods inherited from BaseHandler

handle!, #initialize

Constructor Details

This class inherits a constructor from OmniAI::CLI::BaseHandler

Instance Method Details

#handle!(argv:) ⇒ Object

Parameters:

  • argv (Array<String>)


8
9
10
11
12
13
14
15
16
# File 'lib/omniai/cli/embed_handler.rb', line 8

def handle!(argv:)
  parser.parse!(argv)

  if argv.empty?
    listen!
  else
    embed(input: argv.join(' '))
  end
end