Class: Dict::Glosbe
- Inherits:
-
Dictionary
- Object
- Dictionary
- Dict::Glosbe
- Defined in:
- lib/dict/glosbe.rb
Instance Method Summary collapse
-
#translate ⇒ Object
returns an Dict::Result object.
Methods inherited from Dictionary
#check_arguments, #initialize, message, #uri
Constructor Details
This class inherits a constructor from Dict::Dictionary
Instance Method Details
#translate ⇒ Object
returns an Dict::Result object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/dict/glosbe.rb', line 12 def translate if is_polish?(doc = get_content(GLOSBE_PL, @word)) add_translations(get_translations(doc)) add_examples(get_examples(doc, 'en')) else doc = get_content(GLOSBE_EN, @word) add_translations(get_translations(doc)) add_examples(get_examples(doc, 'pl')) end @result end |