Module: Vocabulary
- Defined in:
- lib/vocabulary.rb,
lib/vocabulary/version.rb
Defined Under Namespace
Classes: Dictionary, Word
Constant Summary
collapse
- VERSION =
"0.0.1"
Class Method Summary
collapse
Class Method Details
.lookup(word, source_lang, target_lang = nil) ⇒ Object
44
45
46
47
48
|
# File 'lib/vocabulary.rb', line 44
def self.lookup(word, source_lang, target_lang = nil)
target_lang ||= :en
data = Disctionary.new.get(word, source_lang.to_s, target_lang.to_s)
Word.new(data)
end
|