class Tsearch::CLI
Handle the application command line parsing and the dispatch to various command objects
@api public
Constants
- Error
Error
raised by this runner
Public Class Methods
exit_on_failure?()
click to toggle source
# File lib/tsearch/cli.rb, line 14 def self.exit_on_failure? true end
Public Instance Methods
search()
click to toggle source
# File lib/tsearch/cli.rb, line 45 def search if options[:help] invoke :help, ['search'] else if options[:string].nil? && options[:imdb].nil? && options[:tvdb].nil? && options[:themoviedb].nil? raise RequiredArgumentMissingError, 'At least one of the search options must be provided: string, imdb, tvdb, themoviedb' end require_relative 'commands/search' Tsearch::Commands::Search.new(options).execute end end
version()
click to toggle source
# File lib/tsearch/cli.rb, line 19 def version require_relative 'version' puts "v#{Tsearch::VERSION}" end