Module: DolphinKit

Defined in:
lib/dolphin_kit.rb,
lib/dolphin_kit/service.rb,
lib/dolphin_kit/version.rb,
lib/dolphin_kit/helpers/http.rb,
lib/dolphin_kit/services/baidu_service.rb,
lib/dolphin_kit/services/qcloud_service.rb,
lib/dolphin_kit/services/youdao_service.rb

Defined Under Namespace

Modules: HTTP Classes: BaiduService, QCloudService, Service, YoudaoService

Constant Summary collapse

VERSION =
'1.0.3'

Class Method Summary collapse

Class Method Details

.create_service(name, **args) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/dolphin_kit.rb', line 12

def create_service(name, **args)
  if args.empty?
    args[:api_key] = ENV["#{name}_FANYI_API_KEY".upcase].to_s
  end

  Service.new(name, **args)
end