Sha256: 3f5df52789da81b39d6dd7bd2b980f2db11ae2ac88c137f4e0e6b4e8ab12aaab
Contents?: true
Size: 380 Bytes
Versions: 9
Compression:
Stored size: 380 Bytes
Contents
module Akami module XPathHelper def at_xpath(node, xpath) return unless node node.at_xpath local_name_xpath(xpath) end def xpath(node, xpath) return unless node node.xpath local_name_xpath(xpath) end def local_name_xpath(xpath) xpath.gsub(%r{([/]*)([A-Za-z]+)([/]*)}) { "#{$1}*[local-name()='#{$2}']#{$3}" } end end end
Version data entries
9 entries across 9 versions & 2 rubygems