Class: FakerBot::Commands::Search

Inherits:
Object
  • Object
show all
Defined in:
lib/faker_bot/commands/search.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Search

Returns a new instance of Search.



9
10
11
# File 'lib/faker_bot/commands/search.rb', line 9

def initialize(options)
  @options = options
end

Instance Method Details

#execute(input) ⇒ Object



13
14
15
16
# File 'lib/faker_bot/commands/search.rb', line 13

def execute(input)
  result = FakerBot::Bot.find(input)
  puts(result.map { |r| Pastel.new.green(r) })
end