Module: Tencent::Cloud
- Defined in:
- lib/tencent/cloud.rb,
lib/tencent/cloud/client.rb,
lib/tencent/cloud/sms_api.rb,
lib/tencent/cloud/version.rb
Defined Under Namespace
Classes: Client, Error, SmsApi
Constant Summary
collapse
- VERSION =
'0.0.3'
Class Method Summary
collapse
Class Method Details
.client ⇒ Object
15
16
17
18
19
|
# File 'lib/tencent/cloud.rb', line 15
def self.client
return @client = yield(Client) if block_given?
@client || raise(::Tencent::Cloud::Error, 'initialize client with block first')
end
|
.logger ⇒ Object
7
8
9
|
# File 'lib/tencent/cloud.rb', line 7
def self.logger
@logger ||= defined?(Rails) ? Rails.logger : ::Logger.new(STDOUT)
end
|
.logger=(logger) ⇒ Object
11
12
13
|
# File 'lib/tencent/cloud.rb', line 11
def self.logger=(logger)
@logger = logger
end
|