Method: YAML::Object#to_yaml
- Defined in:
- lib/yaml/types.rb
#to_yaml(opts = {}) ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/yaml/types.rb', line 49 def to_yaml( opts = {} ) YAML::quick_emit( object_id, opts ) do |out| out.map( "tag:ruby.yaml.org,2002:object:#{ @class }", to_yaml_style ) do |map| @ivars.each do |k,v| map.add( k, v ) end end end end |