class Wordword::CLI

Handle the application command line parsing and the dispatch to various command objects

@api public

Constants

Error

Error raised by this runner

Public Instance Methods

compose(*) click to toggle source
# File lib/wordword/cli.rb, line 27
def compose(*)
  if options[:help]
    invoke :help, ["compose"]
  else
    require_relative "commands/compose"
    Wordword::Commands::Compose.new(options).execute
  end
end
train(file = nil) click to toggle source
# File lib/wordword/cli.rb, line 41
def train(file = nil)
  if options[:help]
    invoke :help, ["train"]
  else
    require_relative "commands/train"
    Wordword::Commands::Train.new(file, options).execute
  end
end
version() click to toggle source
# File lib/wordword/cli.rb, line 17
def version
  require_relative "version"
  puts File.read(File.join(File.dirname(__FILE__), "..", "..", "assets/logo.txt"))
  puts "v#{Wordword::VERSION}"
end