Class: Console1984::Config
- Inherits:
-
Object
- Object
- Console1984::Config
- Includes:
- Messages
- Defined in:
- lib/console1984/config.rb
Overview
Container for config options.
Constant Summary collapse
- PROPERTIES =
i[ session_logger username_resolver protected_environments protected_urls production_data_warning enter_unprotected_encryption_mode_warning enter_protected_mode_warning incinerate incinerate_after incineration_queue debug freeze_config ]
Constants included from Messages
Messages::COMMANDS, Messages::COMMANDS_HELP, Messages::DEFAULT_ENTER_PROTECTED_MODE_WARNING, Messages::DEFAULT_ENTER_UNPROTECTED_ENCRYPTION_MODE_WARNING, Messages::DEFAULT_PRODUCTION_DATA_WARNING
Instance Method Summary collapse
- #freeze ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #set_from(properties) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
15 16 17 |
# File 'lib/console1984/config.rb', line 15 def initialize set_defaults end |
Instance Method Details
#freeze ⇒ Object
25 26 27 28 |
# File 'lib/console1984/config.rb', line 25 def freeze super if freeze_config protected_urls.freeze end |
#set_from(properties) ⇒ Object
19 20 21 22 23 |
# File 'lib/console1984/config.rb', line 19 def set_from(properties) properties.each do |key, value| public_send("#{key}=", value) if value.present? end end |