module Speller::Query

Constants

QUERY_TO_YANDEX

Public Class Methods

send(word) click to toggle source
# File lib/speller/query.rb, line 8
def self.send word

  query_to_yandex_with_word = QUERY_TO_YANDEX + 'text=' + word
  encode_query_to_yandex_with_word = URI.encode query_to_yandex_with_word
  open URI.parse encode_query_to_yandex_with_word

rescue Errno::ETIMEDOUT, SocketError
  puts "Please, check your network connect!"
end