Sha256: db0f16a6b7add30eb2539671bd1c52bac66fd9f804f939b4d7f7e3f848052174

Contents?: true

Size: 1.55 KB

Versions: 5

Compression:

Stored size: 1.55 KB

Contents

# frozen_string_literal: true

require 'chamber/rubinius_fix'
require 'chamber/instance'
require 'chamber/rails'

module  Chamber
  attr_writer :instance

  def load(**args)
    self.instance = Instance.new(**args)
  end

  def instance
    @instance ||= Instance.new
  end

  def [](key)
    instance.[](key)
  end

  def dig!(*args)
    instance.dig!(*args)
  end

  def dig(*args)
    instance.dig(*args)
  end

  def configuration
    instance.configuration
  end

  def decrypt(value, **args)
    instance.decrypt(value, **args)
  end

  def encrypt(value, **args)
    instance.encrypt(value, **args)
  end

  def files
    instance.files
  end

  def filenames
    instance.filenames
  end

  def namespaces
    instance.namespaces
  end

  def secure
    instance.secure
  end

  def sign
    instance.sign
  end

  def verify
    instance.verify
  end

  def to_environment
    instance.to_environment
  end

  def to_hash
    instance.to_hash
  end

  def to_s(**args)
    return '' unless @instance

    instance.to_s(**args)
  end

  module_function :[],
                  :configuration,
                  :decrypt,
                  :dig!,
                  :dig,
                  :encrypt,
                  :filenames,
                  :files,
                  :instance,
                  :instance=,
                  :load,
                  :namespaces,
                  :respond_to_missing?,
                  :secure,
                  :sign,
                  :to_environment,
                  :to_hash,
                  :to_s,
                  :verify
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chamber-3.1.1 lib/chamber.rb
chamber-3.1.0 lib/chamber.rb
chamber-3.0.1 lib/chamber.rb
chamber-3.0.0 lib/chamber.rb
chamber-3.0.0rc2 lib/chamber.rb