Class: EacConfig::OldConfigs Deprecated
- Inherits:
-
Object
- Object
- EacConfig::OldConfigs
- Includes:
- EacRubyUtils::SimpleCache
- Defined in:
- lib/eac_config/old_configs.rb,
lib/eac_config/old_configs/base.rb,
lib/eac_config/old_configs/file.rb
Overview
Deprecated.
Use YamlFileNode instead.
Defined Under Namespace
Instance Attribute Summary collapse
-
#configs_key ⇒ Object
readonly
Returns the value of attribute configs_key.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #[](entry_key) ⇒ Object
- #[]=(entry_key, entry_value) ⇒ Object
-
#initialize(configs_key, options = {}) ⇒ OldConfigs
constructor
Valid options: [:storage_path].
- #read_entry(entry_key) ⇒ Object
- #write_entry(entry_key, entry_value) ⇒ Object
Constructor Details
#initialize(configs_key, options = {}) ⇒ OldConfigs
Valid options: [:storage_path]
18 19 20 21 22 |
# File 'lib/eac_config/old_configs.rb', line 18 def initialize(configs_key, = {}) @configs_key = configs_key @options = .to_sym_keys_hash.freeze load end |
Instance Attribute Details
#configs_key ⇒ Object (readonly)
Returns the value of attribute configs_key.
15 16 17 |
# File 'lib/eac_config/old_configs.rb', line 15 def configs_key @configs_key end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
15 16 17 |
# File 'lib/eac_config/old_configs.rb', line 15 def @options end |
Instance Method Details
#[](entry_key) ⇒ Object
38 39 40 |
# File 'lib/eac_config/old_configs.rb', line 38 def [](entry_key) read_entry(entry_key) end |
#[]=(entry_key, entry_value) ⇒ Object
30 31 32 |
# File 'lib/eac_config/old_configs.rb', line 30 def []=(entry_key, entry_value) write_entry(entry_key, entry_value) end |
#read_entry(entry_key) ⇒ Object
42 43 44 |
# File 'lib/eac_config/old_configs.rb', line 42 def read_entry(entry_key) file.read(entry_key) end |
#write_entry(entry_key, entry_value) ⇒ Object
34 35 36 |
# File 'lib/eac_config/old_configs.rb', line 34 def write_entry(entry_key, entry_value) file.write(entry_key, entry_value) end |