Class: Lhj::OSSConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/lhj/helper/oss_config.rb

Class Method Summary collapse

Class Method Details

.configObject



12
13
14
# File 'lib/lhj/helper/oss_config.rb', line 12

def self.config
  @yaml ||= YAML.load_file(config_file)
end

.config_fileObject



7
8
9
10
# File 'lib/lhj/helper/oss_config.rb', line 7

def self.config_file
  file = 'oss_config.yml'
  File.expand_path("#{Lhj::Config.instance.home_dir}/#{file}")
end

.oss_access_key_idObject



20
21
22
# File 'lib/lhj/helper/oss_config.rb', line 20

def self.oss_access_key_id
  config['oss_access_key_id']
end

.oss_access_key_secretObject



24
25
26
# File 'lib/lhj/helper/oss_config.rb', line 24

def self.oss_access_key_secret
  config['oss_access_key_secret']
end

.oss_bucketObject



28
29
30
# File 'lib/lhj/helper/oss_config.rb', line 28

def self.oss_bucket
  config['oss_bucket']
end

.oss_endpointObject



16
17
18
# File 'lib/lhj/helper/oss_config.rb', line 16

def self.oss_endpoint
  config['oss_endpoint']
end