Class: FakerBot::CLI

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

Constant Summary collapse

Error =
Class.new(StandardError)

Instance Method Summary collapse

Instance Method Details

#search(query) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/fakerbot/cli.rb', line 24

def search(query)
  if options[:help]
    invoke :help, ['search']
  else
    FakerBot::Commands::Search.new(options).execute(query)
  end
end

#versionObject



13
14
15
16
# File 'lib/fakerbot/cli.rb', line 13

def version
  require_relative 'version'
  puts "v#{FakerBot::VERSION}"
end