Class: YandexInflect::Inflection

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/yandex_inflect.rb

Overview

Класс для получения данных с веб-сервиса Яндекса.

Instance Method Summary collapse

Instance Method Details

#get(name) ⇒ Object

Получить склонения для имени name



19
20
21
22
23
24
25
# File 'lib/yandex_inflect.rb', line 19

def get(name)
  options = {}
  options[:query] = { :name => name }
  inflections = self.class.get("/inflect.xml", options)
  
  return inflections["inflections"]["inflection"]
end