Class: Aliyun::Log::Config
- Inherits:
-
Aliyun::Log::Common::AttrStruct
- Object
- Aliyun::Log::Common::AttrStruct
- Aliyun::Log::Config
- Defined in:
- lib/aliyun/log/config.rb
Class Attribute Summary collapse
-
.access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
.access_key_secret ⇒ Object
Returns the value of attribute access_key_secret.
-
.endpoint ⇒ Object
Returns the value of attribute endpoint.
-
.log_file ⇒ Object
Returns the value of attribute log_file.
-
.log_level ⇒ Object
Returns the value of attribute log_level.
-
.open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
.project ⇒ Object
Returns the value of attribute project.
-
.read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
.timestamps ⇒ Object
Returns the value of attribute timestamps.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Config
constructor
A new instance of Config.
Methods inherited from Aliyun::Log::Common::AttrStruct
Methods included from Aliyun::Log::Common::AttrStruct::AttrHelper
Constructor Details
#initialize(opts = {}) ⇒ Config
Returns a new instance of Config.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/aliyun/log/config.rb', line 26 def initialize(opts = {}) super(opts) @open_timeout ||= self.class.open_timeout @read_timeout ||= self.class.read_timeout @access_key_id ||= self.class.access_key_id @access_key_secret ||= self.class.access_key_secret @endpoint ||= self.class.endpoint normalize_endpoint raise 'Missing AccessKeyID or AccessKeySecret' if @access_key_id.nil? || @access_key_secret.nil? end |
Class Attribute Details
.access_key_id ⇒ Object
Returns the value of attribute access_key_id.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def access_key_id @access_key_id end |
.access_key_secret ⇒ Object
Returns the value of attribute access_key_secret.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def access_key_secret @access_key_secret end |
.endpoint ⇒ Object
Returns the value of attribute endpoint.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def endpoint @endpoint end |
.log_file ⇒ Object
Returns the value of attribute log_file.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def log_file @log_file end |
.log_level ⇒ Object
Returns the value of attribute log_level.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def log_level @log_level end |
.open_timeout ⇒ Object
Returns the value of attribute open_timeout.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def open_timeout @open_timeout end |
.project ⇒ Object
Returns the value of attribute project.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def project @project end |
.read_timeout ⇒ Object
Returns the value of attribute read_timeout.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def read_timeout @read_timeout end |
.timestamps ⇒ Object
Returns the value of attribute timestamps.
14 15 16 |
# File 'lib/aliyun/log/config.rb', line 14 def @timestamps end |
Class Method Details
.configure {|_self| ... } ⇒ Object
18 19 20 |
# File 'lib/aliyun/log/config.rb', line 18 def configure yield self end |