Skip to content

Instantly share code, notes, and snippets.

@yorickpeterse
Created July 28, 2015 18:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yorickpeterse/bdea3b73ac9166acc579 to your computer and use it in GitHub Desktop.
# Generated from XPath "20 > root/a"
lambda do |node, variables = nil|
op_left1 = begin
20.0
end
op_right2 = begin
catch(:value) do ||
node.children.each do |node|
if (node.is_a?(Oga::XML::Attribute) || node.is_a?(Oga::XML::Element)) && node.name == "root"
node.children.each do |node|
if (node.is_a?(Oga::XML::Attribute) || node.is_a?(Oga::XML::Element)) && node.name == "a"
throw(:value, node)
end
end
end
end
nil
end
end
Conversion.to_float(op_left1).>(Conversion.to_float(op_right2))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment