Sha256: 1c0fe5738a2b7a56acc9581858d0f9a8056a456ee5098c1079f0643a07281c97
Contents?: true
Size: 690 Bytes
Versions: 5
Compression:
Stored size: 690 Bytes
Contents
#encoding: utf-8 $KCODE = 'u' unless RUBY_VERSION >= "1.9" require "youdao_fanyi/version" require "active_support/core_ext/object" require "yaml" require "httparty" require "json" require "uri" #require "cgi" require "youdao_fanyi/errors" require "youdao_fanyi/configuration" require "youdao_fanyi/connector" require "youdao_fanyi/translator" module YoudaoFanyi def self.configure yield Configuration reload! end def self.reload! load "youdao_fanyi/connector.rb" load "youdao_fanyi/translator.rb" end def self.api_key YoudaoFanyi::Configuration.api_keys.sort_by!{rand()}.first end def self.t(*words) YoudaoFanyi::Translator.t(*words) end end
Version data entries
5 entries across 5 versions & 1 rubygems