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

#listObject



27
28
29
30
31
32
33
# File 'lib/fakerbot/cli.rb', line 27

def list(*)
  if options[:help]
    invoke :help, ['list']
  else
    FakerBot::Commands::List.new(options).execute
  end
end

#search(query) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/fakerbot/cli.rb', line 42

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

#versionObject



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

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