Class: Numeric

Class | Numeric
In: | yaml/rubytypes.rb
Parent: | Object

### Methods

to_yaml

### Public Instance methods

to_yaml( opts = {} )

[Source]

    # File yaml/rubytypes.rb, line 356
            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( taguri, str, :plain )
            end
            end

[Validate]