Class: DictCache::Dict

Inherits:
Object
  • Object
show all
Defined in:
lib/dict_cache/dict.rb

Class Method Summary collapse

Class Method Details

.translate(word) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/dict_cache/dict.rb', line 5

def self.translate(word)
  Cache.with_cache do
    BingDictionary::Base.translate(word)
  end
rescue StandardError
  error 'Translate Error: check your word is valid.'
  exit 1
end