class Artifactory::Resource::Base

def find_from_config(xpath, config, options = {})

Parameters:
  • options (Hash) --
  • config (REXML) --
  • xpath (String) --
def find_from_config(xpath, config, options = {})
  name_node = REXML::XPath.match(config, xpath)
  return nil if name_node.empty?
  properties = {}
  name_node[0].parent.each_element_with_text do |e|
    properties[e.name] = Util.to_type(e.text)
  end
  from_hash(properties, options)
end