Class: CM::Configuration::Directory
- Inherits:
-
Object
- Object
- CM::Configuration::Directory
- Defined in:
- lib/CM/configuration/directory.rb
Instance Method Summary collapse
-
#initialized?(options = {}) ⇒ Boolean
—————————————————————————– Checks.
-
#normalize(reload) ⇒ Object
—————————————————————————– Plugin interface.
-
#output_file ⇒ Object
—————————————————————————– Property accessors / modifiers.
-
#parse(wipe = true) ⇒ Object
—————————————————————————– Operations.
-
#save ⇒ Object
—.
- #target_path ⇒ Object
Instance Method Details
#initialized?(options = {}) ⇒ Boolean
Checks
17 18 19 |
# File 'lib/CM/configuration/directory.rb', line 17 def initialized?( = {}) ::File.directory?(path) end |
#normalize(reload) ⇒ Object
Plugin interface
9 10 11 12 |
# File 'lib/CM/configuration/directory.rb', line 9 def normalize(reload) super yield if block_given? end |
#output_file ⇒ Object
Property accessors / modifiers
24 25 26 |
# File 'lib/CM/configuration/directory.rb', line 24 def output_file _get(:output_file, 'rendered.config.yaml') end |
#parse(wipe = true) ⇒ Object
Operations
35 36 37 38 39 |
# File 'lib/CM/configuration/directory.rb', line 35 def parse(wipe = true) super do import_directory(path) end end |
#save ⇒ Object
43 44 45 46 47 |
# File 'lib/CM/configuration/directory.rb', line 43 def save super do save_config(target_path, export) end end |
#target_path ⇒ Object
28 29 30 |
# File 'lib/CM/configuration/directory.rb', line 28 def target_path ::File.join(path, output_file) end |