Class: CM::Configuration::File

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

Instance Method Summary collapse

Instance Method Details

#initialized?(options = {}) ⇒ Boolean


Checks

Returns:

  • (Boolean)


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

def initialized?(options = {})
  path && ::File.exist?(path)
end

#normalize(reload) ⇒ Object


Plugin interface



9
10
11
12
# File 'lib/CM/configuration/file.rb', line 9

def normalize(reload)
  super
  yield if block_given?
end

#parse(wipe = true) ⇒ Object


Operations



27
28
29
30
31
# File 'lib/CM/configuration/file.rb', line 27

def parse(wipe = true)
  super do
    import_file(path)
  end
end

#saveObject




35
36
37
38
39
# File 'lib/CM/configuration/file.rb', line 35

def save
  super do
    save_config(path, export)
  end
end