Class: CM::Configuration::Directory

Inherits:
Object
  • Object
show all
Defined in:
lib/CM/configuration/directory.rb

Instance Method Summary collapse

Instance Method Details

#initialized?(options = {}) ⇒ Boolean


Checks

Returns:

  • (Boolean)


17
18
19
# File 'lib/CM/configuration/directory.rb', line 17

def initialized?(options = {})
  ::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_fileObject


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

#saveObject




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_pathObject



28
29
30
# File 'lib/CM/configuration/directory.rb', line 28

def target_path
  ::File.join(path, output_file)
end