9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/namesies/cli.rb', line 9
def search(q)
puts "Searching for #{q}..."
puts "\n"
services = Namesies.constants - [:VERSION, :CLI, :Reporter]
if options[:only]
options[:only].each do |service|
Namesies.const_get(service.capitalize).send(:search, q)
end
else
services.each do |service|
next if options[:except] && options[:except].include?(service.to_s.downcase)
Namesies.const_get(service.capitalize).send(:search, q)
end
end
puts "\n"
end
|