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.



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

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

  self.basepath       = options[:basepath]
  self.namespaces     = options[:namespaces]
  self.decryption_key = options[:decryption_key]
  self.encryption_key = options[:encryption_key]
  self.files          = options[:files]
end

Instance Attribute Details

#basepathObject

Returns the value of attribute basepath.



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

def basepath
  @basepath
end

#decryption_keyObject

Returns the value of attribute decryption_key.



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

def decryption_key
  @decryption_key
end

#encryption_keyObject

Returns the value of attribute encryption_key.



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

def encryption_key
  @encryption_key
end

#filesObject

Returns the value of attribute files.



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

def files
  @files
end

#namespacesObject

Returns the value of attribute namespaces.



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

def namespaces
  @namespaces
end

Instance Method Details

#to_hashObject



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

def to_hash
  {
    basepath:       self.basepath,
    decryption_key: self.decryption_key,
    encryption_key: self.encryption_key,
    files:          self.files,
    namespaces:     self.namespaces,
  }
end