Class: WirisPlugin::DefaultConfigurationUpdater
- Inherits:
-
Object
- Object
- WirisPlugin::DefaultConfigurationUpdater
- Extended by:
- ConfigurationUpdaterInterface
- Includes:
- Wiris
- Defined in:
- lib/com/wiris/plugin/impl/DefaultConfigurationUpdater.rb
Instance Method Summary collapse
- #init(obj) ⇒ Object
-
#initialize ⇒ DefaultConfigurationUpdater
constructor
A new instance of DefaultConfigurationUpdater.
- #updateConfiguration(ref_configuration) ⇒ Object
Methods included from ConfigurationUpdaterInterface
Constructor Details
#initialize ⇒ DefaultConfigurationUpdater
Returns a new instance of DefaultConfigurationUpdater.
11 12 13 |
# File 'lib/com/wiris/plugin/impl/DefaultConfigurationUpdater.rb', line 11 def initialize() super() end |
Instance Method Details
#init(obj) ⇒ Object
14 15 |
# File 'lib/com/wiris/plugin/impl/DefaultConfigurationUpdater.rb', line 14 def init(obj) end |
#updateConfiguration(ref_configuration) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/com/wiris/plugin/impl/DefaultConfigurationUpdater.rb', line 16 def updateConfiguration(ref_configuration) configuration = ref_configuration s = Storage::newResourceStorage("default-configuration.ini")::read() defaultIniFile = IniFile::newIniFileFromString(s) h = defaultIniFile::getProperties() iter = h::keys() while iter::hasNext() key = iter::next() if PropertiesTools::getProperty(configuration,key) == nil PropertiesTools::setProperty(configuration,key,h::get(key)) end end end |