def to_yaml( opts = {} )
YAML::quick_emit( self.object_id, opts ) { |out|
if self.begin.is_complex_yaml? or self.end.is_complex_yaml? or not to_yaml_properties.empty?
out.map( to_yaml_type ) { |map|
map.add( 'begin', self.begin )
map.add( 'end', self.end )
map.add( 'excl', self.exclude_end? )
to_yaml_properties.each { |m|
map.add( m, instance_variable_get( m ) )
}
}
else
out << "#{ to_yaml_type } '"
self.begin.to_yaml(:Emitter => out)
out << ( self.exclude_end? ? "..." : ".." )
self.end.to_yaml(:Emitter => out)
out << "'"
end
}
end