Class: Secrets::Configuration

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

Overview

Application configuration Singleton class. It’s values are requested by the library upon encryption or decryption, or any other operation.

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



8
9
10
# File 'lib/secrets/configuration.rb', line 8

def config
  @config
end

Instance Attribute Details

#compression_enabledObject

Returns the value of attribute compression_enabled.



21
22
23
# File 'lib/secrets/configuration.rb', line 21

def compression_enabled
  @compression_enabled
end

#compression_levelObject

Returns the value of attribute compression_level.



21
22
23
# File 'lib/secrets/configuration.rb', line 21

def compression_level
  @compression_level
end

#data_cipherObject

Returns the value of attribute data_cipher.



20
21
22
# File 'lib/secrets/configuration.rb', line 20

def data_cipher
  @data_cipher
end

#password_cipherObject

Returns the value of attribute password_cipher.



20
21
22
# File 'lib/secrets/configuration.rb', line 20

def password_cipher
  @password_cipher
end

#private_key_cipherObject

Returns the value of attribute private_key_cipher.



20
21
22
# File 'lib/secrets/configuration.rb', line 20

def private_key_cipher
  @private_key_cipher
end

Class Method Details

.configure {|config| ... } ⇒ Object

Yields:



10
11
12
13
# File 'lib/secrets/configuration.rb', line 10

def configure
  self.config ||= Configuration.new
  yield config if block_given?
end

.property(name) ⇒ Object



15
16
17
# File 'lib/secrets/configuration.rb', line 15

def property(name)
  self.config.send(name)
end