Sha256: 18cb3b957bb83b0839caf88ead3b6258f085ca6194e038ddbe89d9e69d6ee5ed

Contents?: true

Size: 766 Bytes

Versions: 4

Compression:

Stored size: 766 Bytes

Contents

# frozen_string_literal: true

require 'invar/version'
require 'invar/reality'

# Invar is a Ruby Gem that provides a single source of truth for application configuration, secrets, and environment
# variables.
module Invar
   # Alias for Invar::Reality.new
   #
   # @see Invar::Reality.new
   def self.new(**args)
      ::Invar::Reality.new(**args)
   end

   class << self
      # Block that will be run after loading from config files and prior to freezing. It is intended to allow
      # for test suites to tweak configurations without having to duplicate the entire config file.
      #
      # @yieldparam the configs from the Invar
      # @return [void]
      def after_load(&block)
         ::Invar::Reality.__override_block__ = block
      end
   end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
invar-0.6.1 lib/invar.rb
invar-0.6.0 lib/invar.rb
invar-0.5.1 lib/invar.rb
invar-0.5.0 lib/invar.rb