Class: DWSRegistryWrapper
- Inherits:
-
Object
- Object
- DWSRegistryWrapper
- Defined in:
- lib/drb_reg_server.rb
Instance Method Summary collapse
- #delete_key(path) ⇒ Object
- #get_key(path, auto_detect_type: false) ⇒ Object
- #get_keys(path) ⇒ Object
-
#initialize(filepath) ⇒ DWSRegistryWrapper
constructor
A new instance of DWSRegistryWrapper.
- #set_key(path, value) ⇒ Object
- #xpath(xpath) ⇒ Object
Constructor Details
#initialize(filepath) ⇒ DWSRegistryWrapper
Returns a new instance of DWSRegistryWrapper.
13 14 15 |
# File 'lib/drb_reg_server.rb', line 13 def initialize(filepath) @reg = DWSRegistry.new filepath end |
Instance Method Details
#delete_key(path) ⇒ Object
17 18 19 |
# File 'lib/drb_reg_server.rb', line 17 def delete_key(path) @reg.delete_key path end |
#get_key(path, auto_detect_type: false) ⇒ Object
21 22 23 24 |
# File 'lib/drb_reg_server.rb', line 21 def get_key(path, auto_detect_type: false) e = @reg.get_key(path, auto_detect_type: auto_detect_type) e.xml end |
#get_keys(path) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/drb_reg_server.rb', line 26 def get_keys(path) recordset = @reg.get_keys(key) if recordset then recordset.to_doc(root: 'recordset').root.xml else nil end end |
#set_key(path, value) ⇒ Object
36 37 38 39 |
# File 'lib/drb_reg_server.rb', line 36 def set_key(path, value) e = @reg.set_key(path, value) e.xml end |
#xpath(xpath) ⇒ Object
41 42 |
# File 'lib/drb_reg_server.rb', line 41 def xpath(xpath) end |