Class: Abt::DirectoryConfig
- Inherits:
-
Hash
- Object
- Hash
- Abt::DirectoryConfig
- Defined in:
- lib/abt/directory_config.rb
Constant Summary collapse
- FILE_NAME =
".abt.yml"
Instance Method Summary collapse
- #available? ⇒ Boolean
-
#initialize ⇒ DirectoryConfig
constructor
A new instance of DirectoryConfig.
- #load! ⇒ Object
- #save! ⇒ Object
Constructor Details
#initialize ⇒ DirectoryConfig
Returns a new instance of DirectoryConfig.
7 8 9 10 |
# File 'lib/abt/directory_config.rb', line 7 def initialize super load! if config_file_path && File.exist?(config_file_path) end |
Instance Method Details
#available? ⇒ Boolean
12 13 14 |
# File 'lib/abt/directory_config.rb', line 12 def available? !config_file_path.nil? end |
#load! ⇒ Object
16 17 18 |
# File 'lib/abt/directory_config.rb', line 16 def load! merge!(YAML.load_file(config_file_path)) end |