class FakerBot::Commands::Search
Public Class Methods
new(options)
click to toggle source
# File lib/fakerbot/commands/search.rb, line 8 def initialize(options) @options = options end
Public Instance Methods
execute(input, output: $stdout)
click to toggle source
# File lib/fakerbot/commands/search.rb, line 12 def execute(input, output: $stdout) render FakerBot::Reflector.find(input), output end
Private Instance Methods
not_found()
click to toggle source
# File lib/fakerbot/commands/search.rb, line 23 def not_found puts "\nSorry, we couldn't find a match 😢", "\n" end
render(result, output)
click to toggle source
Calls superclass method
FakerBot::Command#render
# File lib/fakerbot/commands/search.rb, line 18 def render(result, output) return not_found if result.empty? super(result, output) end