Sha256: dace90c9e0004a60872f57d316a9c0761a9fcea33841371ffe7670c185b2af3b

Contents?: true

Size: 496 Bytes

Versions: 8

Compression:

Stored size: 496 Bytes

Contents

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

module Lhj
  # pgyer config
  class PgyerConfig

    CONFIG_NAME = 'pgyer_config.yml'

    def self.config_file
      File.join(Lhj::Config.instance.home_dir, CONFIG_NAME)
    end

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

    def self.api_key
      config['api_key']
    end

    def self.user_key
      config['user_key']
    end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lhj-tools-0.1.23 lib/lhj/helper/pgyer_config.rb
lhj-tools-0.1.22 lib/lhj/helper/pgyer_config.rb
lhj-tools-0.1.21 lib/lhj/helper/pgyer_config.rb
lhj-tools-0.1.20 lib/lhj/helper/pgyer_config.rb
lhj-tools-0.1.19 lib/lhj/helper/pgyer_config.rb
lhj-tools-0.1.18 lib/lhj/helper/pgyer_config.rb
lhj-tools-0.1.17 lib/lhj/helper/pgyer_config.rb
lhj-tools-0.1.16 lib/lhj/helper/pgyer_config.rb