class DWSRegistryWrapper

Public Class Methods

new(filename) click to toggle source
# File lib/drb_reg_server.rb, line 12
def initialize(filename)
  
  @filename = filename
  load_reg()
  
end

Public Instance Methods

delete_key(key) click to toggle source
# File lib/drb_reg_server.rb, line 19
def delete_key(key)
  r = @reg.delete_key key
  r ? 'key deleted' : 'key not found'
end
gem_register(gemfile) click to toggle source
# File lib/drb_reg_server.rb, line 38
def gem_register(gemfile)    
  @reg.gem_register(gemfile)
end
get_key(path, auto_detect_type: false) click to toggle source
# File lib/drb_reg_server.rb, line 24
def get_key(path, auto_detect_type: false)
  e = @reg.get_key(path, auto_detect_type: auto_detect_type)
  e.xml
end
get_keys(key) click to toggle source
# File lib/drb_reg_server.rb, line 29
def get_keys(key)
  
  recordset = @reg.get_keys(key)
  return unless recordset
  
  recordset.to_doc(root: 'recordset').root.xml

end
import(s) click to toggle source
# File lib/drb_reg_server.rb, line 42
def import(s)
  @reg.import(s)    
end
refresh() click to toggle source
# File lib/drb_reg_server.rb, line 46
def refresh()
  load_reg()
end
set_key(path, value) click to toggle source
# File lib/drb_reg_server.rb, line 50
def set_key(path, value)
  e = @reg.set_key(path, value)
  e.xml
end
xpath(xpath) click to toggle source
# File lib/drb_reg_server.rb, line 55
def xpath(xpath)
  
  recordset = @reg.xpath(xpath)
  return unless recordset
  
  recordset.to_doc(root: 'recordset').root.xml          
  
end

Private Instance Methods

load_reg() click to toggle source
# File lib/drb_reg_server.rb, line 66
def load_reg()
  @reg = DWSRegistry.new(@filename)    
end