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.



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

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.



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

def basepath
  @basepath
end

#decryption_keyObject

Returns the value of attribute decryption_key.



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

def decryption_key
  @decryption_key
end

#encryption_keyObject

Returns the value of attribute encryption_key.



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

def encryption_key
  @encryption_key
end

#filesObject

Returns the value of attribute files.



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

def files
  @files
end

#namespacesObject

Returns the value of attribute namespaces.



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

def namespaces
  @namespaces
end

Instance Method Details

#to_hashObject



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

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