1 require 'rbyaml/constants'
2 require 'rbyaml/emitter'
3 require 'rbyaml/serializer'
4 require 'rbyaml/representer'
5 require 'rbyaml/resolver'
9 attr_accessor :emitter, :serializer, :representer, :resolver
10 def initialize(stream,opts={})
12 opts = DEFAULTS.merge(opts)
13 @emitter = opts[:Emitter].new(stream,opts)
14 @resolver = opts[:Resolver].new
15 @serializer = opts[:Serializer].new(@emitter,@resolver,opts)
16 @representer = opts[:Representer].new(@serializer,opts)
20 class BaseDumper < CommonDumper
22 def initialize(stream,opts={})
23 super(stream,DEFAULTS.merge({:Representer=>RbYAML::BaseRepresenter, :Resolver=>RbYAML::BaseResolver}).merge(opts))
27 class SafeDumper < CommonDumper
28 def initialize(stream,opts={})
29 super(stream,DEFAULTS.merge({:Representer=>RbYAML::SafeRepresenter}).merge(opts))
34 class Dumper < CommonDumper
35 def initialize(stream,opts={})