Sha256: 0633d64e584fc041950842953616b1168661362ee770992b581e62a11b8bb885
Contents?: true
Size: 565 Bytes
Versions: 1
Compression:
Stored size: 565 Bytes
Contents
# frozen_string_literal: true require 'fakerbot/bot' require_relative '../command' module FakerBot module Commands class Search < FakerBot::Command def initialize(options) @options = options end def execute(input, output: $stdout) render FakerBot::Bot.find(input), output end private def render(result, output) return not_found if result.empty? super(result, output) end def not_found puts "\nSorry, we couldn't find a match 😢", "\n" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fakerbot-0.3.0 | lib/fakerbot/commands/search.rb |