Class: Numeric
Instance Method Summary collapse
Instance Method Details
#is_complex_yaml? ⇒ Boolean
338 |
# File 'lib/rbyaml/rubytypes.rb', line 338 def is_complex_yaml?; false; end |
#to_yaml_node(repre) ⇒ Object
339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/rbyaml/rubytypes.rb', line 339 def to_yaml_node( repre ) RbYAML::quick_emit_node( nil, repre ) do |rep| str = self.to_s if str == "Infinity" str = ".inf" elsif str == "-Infinity" str = "-.inf" elsif str == "NaN" str = ".nan" end rep.scalar( taguri, str, nil ) end end |