Class: Rational
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#to_yaml(opts = {}) ⇒ Object
407 408 409 410 411 412 413 414 415 |
# File 'lib/syck/rubytypes.rb', line 407 def to_yaml( opts = {} ) return super unless YAML::ENGINE.syck? YAML::quick_emit( self, opts ) do |out| out.map( taguri, nil ) do |map| map.add( 'denominator', denominator ) map.add( 'numerator', numerator ) end end end |