Class: ForemanMaintain::Config
- Inherits:
-
Object
- Object
- ForemanMaintain::Config
- Defined in:
- lib/foreman_maintain/config.rb
Instance Attribute Summary collapse
-
#backup_dir ⇒ Object
Returns the value of attribute backup_dir.
-
#config_file ⇒ Object
Returns the value of attribute config_file.
-
#db_backup_dir ⇒ Object
Returns the value of attribute db_backup_dir.
-
#definitions_dirs ⇒ Object
Returns the value of attribute definitions_dirs.
-
#foreman_proxy_cert_path ⇒ Object
Returns the value of attribute foreman_proxy_cert_path.
-
#log_dir ⇒ Object
Returns the value of attribute log_dir.
-
#log_file_size ⇒ Object
Returns the value of attribute log_file_size.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#pre_setup_log_messages ⇒ Object
Returns the value of attribute pre_setup_log_messages.
-
#storage_file ⇒ Object
Returns the value of attribute storage_file.
Instance Method Summary collapse
-
#initialize(options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options) ⇒ Config
Returns a new instance of Config.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/foreman_maintain/config.rb', line 9 def initialize() @pre_setup_log_messages = [] @config_file = .fetch(:config_file, config_file_path) @options = load_config @definitions_dirs = @options.fetch(:definitions_dirs, [File.join(source_path, 'definitions')]) load_log_configs load_backup_dir_paths @foreman_proxy_cert_path = @options.fetch(:foreman_proxy_cert_path, '/etc/foreman') end |
Instance Attribute Details
#backup_dir ⇒ Object
Returns the value of attribute backup_dir.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def backup_dir @backup_dir end |
#config_file ⇒ Object
Returns the value of attribute config_file.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def config_file @config_file end |
#db_backup_dir ⇒ Object
Returns the value of attribute db_backup_dir.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def db_backup_dir @db_backup_dir end |
#definitions_dirs ⇒ Object
Returns the value of attribute definitions_dirs.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def definitions_dirs @definitions_dirs end |
#foreman_proxy_cert_path ⇒ Object
Returns the value of attribute foreman_proxy_cert_path.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def foreman_proxy_cert_path @foreman_proxy_cert_path end |
#log_dir ⇒ Object
Returns the value of attribute log_dir.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def log_dir @log_dir end |
#log_file_size ⇒ Object
Returns the value of attribute log_file_size.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def log_file_size @log_file_size end |
#log_level ⇒ Object
Returns the value of attribute log_level.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def log_level @log_level end |
#pre_setup_log_messages ⇒ Object
Returns the value of attribute pre_setup_log_messages.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def @pre_setup_log_messages end |
#storage_file ⇒ Object
Returns the value of attribute storage_file.
4 5 6 |
# File 'lib/foreman_maintain/config.rb', line 4 def storage_file @storage_file end |