Sha256: 7cce8c7412241a041ba9022c3a83b4f9c6287988d5fdc03c53068c2ad32c078e

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

require 'delegate'
require 'yaml'
require 'ostruct'

module BSClient
  class Config < SimpleDelegator
    class << self
      def create(env, file = nil)
        file ||= File.expand_path('~/.bsclient.yml')
        yaml = YAML.load(File.read(file)) || {}
        conf = yaml[env] || {}
        require 'pry'; binding.pry;
        new(OpenStruct.new(conf))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bsclient-0.1.4 lib/bsclient/config.rb