Class: GoogleTranslate
- Inherits:
-
TranslatorBase
- Object
- TranslatorBase
- GoogleTranslate
- Defined in:
- lib/translators/google_translate.rb
Instance Method Summary collapse
Methods inherited from TranslatorBase
Instance Method Details
#translate(text, source, destination) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/translators/google_translate.rb', line 5 def translate(text, source, destination) result = text begin result = Translate.t(text, source, destination) rescue # Nothing! ensure return result end end |