Flowdock
method

_to_s

Importance_0
v1_8_6_287 - Show latest stable - 0 notes - Class: XSD::XSDFloat
_to_s() private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/xsd/datatypes.rb, line 338
  def _to_s
    if @data.nan?
      'NaN'
    elsif @data.infinite? == 1
      'INF'
    elsif @data.infinite? == -1
      '-INF'
    else
      sign = XSDFloat.positive?(@data) ? '+' : '-'
      sign + sprintf("%.10g", @data.abs).sub(/[eE]([+-])?0+/) { 'e' + $1 }
    end
  end
Register or log in to add new notes.