Method: XPath::XPathString#to_f
- Defined in:
- lib/xml/xpath.rb
#to_f ⇒ Object
809 810 811 812 813 814 815 |
# File 'lib/xml/xpath.rb', line 809 def to_f if /\A\s*(-?\d+\.?\d*)(?:\s|\z)/ =~ @value then $1.to_f else 0.0 / 0.0 # NaN end end |