Sha256: 39454bc697df9a0ae43d1925d9b3dbe865dceb42b1e3fd0beeb421280cd9b5a1

Contents?: true

Size: 495 Bytes

Versions: 5

Compression:

Stored size: 495 Bytes

Contents

require "figaro/error"
require "figaro/env"
require "figaro/application"

module Figaro
  extend self

  attr_writer :adapter, :application

  def env
    Figaro::ENV
  end

  def adapter
    @adapter ||= Figaro::Application
  end

  def application
    @application ||= adapter.new
  end

  def load
    application.load
  end

  def require_keys(*keys)
    missing_keys = keys.flatten - ::ENV.keys
    raise MissingKeys.new(missing_keys) if missing_keys.any?
  end
end

require "figaro/rails"

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
daqing_figaro-1.2.1 lib/figaro.rb
figaro-1.2.0 lib/figaro.rb
figaro-1.1.1 lib/figaro.rb
figaro-1.1.0 lib/figaro.rb
figaro-1.0.0 lib/figaro.rb