lib/search_kit/cli/search.rb in search-kit-0.0.6 vs lib/search_kit/cli/search.rb in search-kit-0.0.7
- old
+ new
@@ -8,15 +8,15 @@
class Search < Thor
namespace :search
no_commands do
def client
- @client ||= Search.new
+ @client ||= SearchKit::Clients::Search.new
end
def messages
- @messages ||= Messages.new
+ @messages ||= SearchKit::Messages.new
end
end
document :create
option :display, aliases: ['-d'], type: :array, required: false
@@ -36,10 +36,10 @@
else
" -- #{document.id} | score: #{document.score}"
end
end
- lines.each(&messages.method(:info))
+ lines.each { |line| messages.info(line) }
rescue Errors::Unauthorized
messages.unauthorized
rescue Errors::IndexNotFound
messages.not_found
rescue Errors::BadRequest