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(**args) ⇒ Configuration

Returns a new instance of Configuration.



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/chamber/configuration.rb', line 15

def initialize(**args)
  options              = ContextResolver.resolve(**args)

  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)
  self.rootpath        = options.fetch(:rootpath)
  self.signature_name  = options.fetch(:signature_name)
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

#rootpathObject

Returns the value of attribute rootpath.



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

def rootpath
  @rootpath
end

#signature_nameObject

Returns the value of attribute signature_name.



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

def signature_name
  @signature_name
end

Instance Method Details

#to_hashObject



27
28
29
30
31
32
33
34
35
36
# File 'lib/chamber/configuration.rb', line 27

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