Sha256: 9b252f6a867113b5bf2749180f298f98d9e2b7aabba33639356812aacc56aec8
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 KB
Contents
module CM module Configuration class File < Nucleon.plugin_class(:CM, :disk_configuration) #----------------------------------------------------------------------------- # Plugin interface def normalize(reload) super yield if block_given? end #----------------------------------------------------------------------------- # Checks #----------------------------------------------------------------------------- # Property accessors / modifiers #----------------------------------------------------------------------------- # Operations def parse(wipe = true) super do import_file(path) end end #--- def save super do save_config(path, export) end end #----------------------------------------------------------------------------- # Utilities def import_file(file, force = true, deep_merge = true) success = true if config_data = parse_config(file) import(config_data, { :force => force, :basic => !deep_merge }) else success = false end success end protected :import_file end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cm-0.1.8 | lib/CM/configuration/file.rb |
cm-0.1.6 | lib/CM/configuration/file.rb |