Class: AssMaintainer::InfoBase::Cfg

Inherits:
Abstract::Cfg
  • Object
show all
Defined in:
lib/ass_maintainer/info_base/cfg.rb

Overview

Object for manipuate whith infobase configuration

Instance Method Summary collapse

Instance Method Details

#dump(path) ⇒ String

Dump configuration to .cf file



29
30
31
32
33
34
# File 'lib/ass_maintainer/info_base/cfg.rb', line 29

def dump(path)
  infobase.designer do
    dumpCfg path
  end.run.wait.result.verify!
  path
end

#dump_xml(path) ⇒ String

Dump configuration to XML files



19
20
21
22
23
24
# File 'lib/ass_maintainer/info_base/cfg.rb', line 19

def dump_xml(path)
  infobase.designer do
    dumpConfigToFiles path
  end.run.wait.result.verify!
  path
end

#load(path) ⇒ String

Load configuration from .cf file



50
51
52
53
54
55
56
# File 'lib/ass_maintainer/info_base/cfg.rb', line 50

def load(path)
  fail MethodDenied, :load_cf if infobase.read_only?
  infobase.designer do
    loadCfg path
  end.run.wait.result.verify!
  path
end

#load_xml(path) ⇒ String

Load configuration from XML files



39
40
41
42
43
44
45
# File 'lib/ass_maintainer/info_base/cfg.rb', line 39

def load_xml(path)
  fail MethodDenied, :load_xml if infobase.read_only?
  infobase.designer do
    loadConfigFromFiles path
  end.run.wait.result.verify!
  path
end