method

to_yaml

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: Float
to_yaml( opts = {} ) public

No documentation

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

Hide source
# File lib/yaml/rubytypes.rb, line 367
        def to_yaml( opts = {} )
                YAML::quick_emit( nil, opts ) do |out|
            str = self.to_s
            if str == "Infinity"
                str = ".Inf"
            elsif str == "-Infinity"
                str = "-.Inf"
            elsif str == "NaN"
                str = ".NaN"
            end
            out.scalar( "tag:yaml.org,2002:float", str, :plain )
        end
        end
Register or log in to add new notes.