Created
July 28, 2015 18:03
-
-
Save yorickpeterse/bdea3b73ac9166acc579 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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