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



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

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

#search(query) ⇒ Object



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

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

#versionObject



16
17
18
19
# File 'lib/fakerbot/cli.rb', line 16

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