Class: Chamber::Configuration
- Inherits:
-
Object
- Object
- Chamber::Configuration
- Defined in:
- lib/chamber/configuration.rb
Instance Attribute Summary collapse
-
#basepath ⇒ Object
Returns the value of attribute basepath.
-
#decryption_key ⇒ Object
Returns the value of attribute decryption_key.
-
#encryption_key ⇒ Object
Returns the value of attribute encryption_key.
-
#files ⇒ Object
Returns the value of attribute files.
-
#namespaces ⇒ Object
Returns the value of attribute namespaces.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #to_hash ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/chamber/configuration.rb', line 9 def initialize( = {}) self.basepath = [:basepath] || '' self.namespaces = [:namespaces] || [] self.decryption_key = [:decryption_key] self.encryption_key = [:encryption_key] self.files = [:files] || [ self.basepath + 'credentials*.yml', self.basepath + 'settings*.yml', self.basepath + 'settings' ] end |
Instance Attribute Details
#basepath ⇒ Object
Returns the value of attribute basepath.
3 4 5 |
# File 'lib/chamber/configuration.rb', line 3 def basepath @basepath end |
#decryption_key ⇒ Object
Returns the value of attribute decryption_key.
3 4 5 |
# File 'lib/chamber/configuration.rb', line 3 def decryption_key @decryption_key end |
#encryption_key ⇒ Object
Returns the value of attribute encryption_key.
3 4 5 |
# File 'lib/chamber/configuration.rb', line 3 def encryption_key @encryption_key end |
#files ⇒ Object
Returns the value of attribute files.
3 4 5 |
# File 'lib/chamber/configuration.rb', line 3 def files @files end |
#namespaces ⇒ Object
Returns the value of attribute namespaces.
3 4 5 |
# File 'lib/chamber/configuration.rb', line 3 def namespaces @namespaces end |
Instance Method Details
#to_hash ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/chamber/configuration.rb', line 20 def to_hash { basepath: self.basepath, decryption_key: self.decryption_key, encryption_key: self.encryption_key, files: self.files, namespaces: self.namespaces, } end |