aegorov/yandex-translator — pull request #5 by bloomrain (2014-11-06 06:36:51+00:00)
Title: Make Yandex translator work same way as BingTranslator and GoogleTranslator

Gems for google translator (https://github.com/seejohnrun/easy_translate) and Bing translator (https://github.com/relrod/bing_translator-gem) uses same method name #translate and accepts same attributes for translating text. In this case we can use duct typing. I added same functionality to yandex translator too. Now you can create translator instance and translate text the same way:
```ruby
translator = Yandex::Translator.new(')
translator.translate('Car', from: 'ru', to: 'en') #=> 'Автомобиль'
```
I also refactored gem structure, added and fixed failing tests
I also tested this in real application and it works for me.
This upgrade should not break current Yandex Translator behavior, but I did not tested this deeply on real applications. It would be awesome if someone can check this pull request