Class: Chamber::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/chamber/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configuration

Returns a new instance of Configuration.



13
14
15
16
17
18
19
20
21
# File 'lib/chamber/configuration.rb', line 13

def initialize(options = {})
  options              = ContextResolver.resolve(options)

  self.basepath        = options.fetch(:basepath)
  self.namespaces      = options.fetch(:namespaces)
  self.decryption_keys = options.fetch(:decryption_keys)
  self.encryption_keys = options.fetch(:encryption_keys)
  self.files           = options.fetch(:files)
end

Instance Attribute Details

#basepathObject

Returns the value of attribute basepath.



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

def basepath
  @basepath
end

#decryption_keysObject

Returns the value of attribute decryption_keys.



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

def decryption_keys
  @decryption_keys
end

#encryption_keysObject

Returns the value of attribute encryption_keys.



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

def encryption_keys
  @encryption_keys
end

#filesObject

Returns the value of attribute files.



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

def files
  @files
end

#namespacesObject

Returns the value of attribute namespaces.



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

def namespaces
  @namespaces
end

Instance Method Details

#to_hashObject



23
24
25
26
27
28
29
30
31
# File 'lib/chamber/configuration.rb', line 23

def to_hash
  {
    basepath:        basepath,
    decryption_keys: decryption_keys,
    encryption_keys: encryption_keys,
    files:           files,
    namespaces:      namespaces,
  }
end