Sha256: b8137d75508dc6844e69d1f876f94ed9f5d1fafa3459dc3b6f3977134754732e

Contents?: true

Size: 659 Bytes

Versions: 1

Compression:

Stored size: 659 Bytes

Contents

# frozen_string_literal: true
require 'yaml'
require 'lhj/config'

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

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

    def self.oss_endpoint
      config['oss_endpoint']
    end

    def self.oss_access_key_id
      config['oss_access_key_id']
    end

    def self.oss_access_key_secret
      config['oss_access_key_secret']
    end

    def self.oss_bucket
      config['oss_bucket']
    end

    def self.oss_bucket_list
      config['oss_bucket_list']
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lhj-tools-0.1.98 lib/lhj/helper/oss_config.rb