Module: YandexSpellerApi::Data
- Defined in:
- lib/yandex_speller_api/data.rb
Constant Summary collapse
- DATA_URL =
"http://speller.yandex.net/services/spellservice.json/checkText"
Class Method Summary collapse
Class Method Details
.get(word) ⇒ Object
9 10 11 12 |
# File 'lib/yandex_speller_api/data.rb', line 9 def self.get word content=JSON.load(open(URI.parse(URI.encode(DATA_URL+'?'+'text='+word)))) return content.empty? ? "All right!" : content[0]['s'] end |