Module: Chamber

Defined in:
lib/chamber/file.rb,
lib/chamber.rb,
lib/chamber/version.rb,
lib/chamber/file_set.rb,
lib/chamber/instance.rb,
lib/chamber/settings.rb,
lib/chamber/binary/heroku.rb,
lib/chamber/binary/runner.rb,
lib/chamber/binary/travis.rb,
lib/chamber/commands/base.rb,
lib/chamber/commands/show.rb,
lib/chamber/configuration.rb,
lib/chamber/namespace_set.rb,
lib/chamber/rails/railtie.rb,
lib/chamber/commands/files.rb,
lib/chamber/decryption_key.rb,
lib/chamber/commands/heroku.rb,
lib/chamber/commands/secure.rb,
lib/chamber/commands/travis.rb,
lib/chamber/environmentable.rb,
lib/chamber/commands/compare.rb,
lib/chamber/context_resolver.rb,
lib/chamber/commands/securable.rb,
lib/chamber/commands/comparable.rb,
lib/chamber/commands/initialize.rb,
lib/chamber/commands/heroku/pull.rb,
lib/chamber/commands/heroku/push.rb,
lib/chamber/commands/heroku/clear.rb,
lib/chamber/filters/secure_filter.rb,
lib/chamber/commands/travis/secure.rb,
lib/chamber/commands/heroku/compare.rb,
lib/chamber/filters/insecure_filter.rb,
lib/chamber/filters/namespace_filter.rb,
lib/chamber/errors/decryption_failure.rb,
lib/chamber/filters/decryption_filter.rb,
lib/chamber/filters/encryption_filter.rb,
lib/chamber/filters/environment_filter.rb,
lib/chamber/filters/failed_decryption_filter.rb,
lib/chamber/filters/boolean_conversion_filter.rb,
lib/chamber/filters/translate_secure_keys_filter.rb

Overview

Internal: Respresents a set of namespaces which will be processed by Chamber at various stages when settings are loaded.

The main function that this class provides is the ability to create a NamespaceSet from either an array-like or hash-like object and the ability to allow callables to be passed which will then be executed.

Defined Under Namespace

Modules: Binary, Commands, Environmentable, Errors, Filters, Rails Classes: Configuration, ContextResolver, DecryptionKey, File, FileSet, Instance, NamespaceSet, Settings

Constant Summary collapse

VERSION =
'2.8.0'

Class Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object (private)



28
29
30
31
32
# File 'lib/chamber.rb', line 28

def method_missing(name, *args)
  return instance.public_send(name, *args) if instance.respond_to?(name)

  super
end

Class Method Details

.envObject



14
15
16
# File 'lib/chamber.rb', line 14

def env
  instance.settings
end

.instanceObject

Returns the value of attribute instance.



20
21
22
# File 'lib/chamber.rb', line 20

def instance
  @instance
end

.instance=(value) ⇒ Object

Sets the attribute instance

Parameters:

  • value

    the value to set the attribute instance to.



20
21
22
# File 'lib/chamber.rb', line 20

def instance=(value)
  @instance = value
end

.load(options = {}) ⇒ Object



6
7
8
# File 'lib/chamber.rb', line 6

def load(options = {})
  self.instance = Instance.new(options)
end

.method_missing(name, *args) ⇒ Object



28
29
30
31
32
# File 'lib/chamber.rb', line 28

def method_missing(name, *args)
  return instance.public_send(name, *args) if instance.respond_to?(name)

  super
end

.respond_to_missing?(name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/chamber.rb', line 34

def respond_to_missing?(name, include_private = false)
  instance.respond_to?(name, include_private)
end

.to_s(options = {}) ⇒ Object



10
11
12
# File 'lib/chamber.rb', line 10

def to_s(options = {})
  instance.to_s(options)
end