diff options
Diffstat (limited to 'ext/psych/lib/psych/visitors/emitter.rb')
-rw-r--r-- | ext/psych/lib/psych/visitors/emitter.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/visitors/emitter.rb b/ext/psych/lib/psych/visitors/emitter.rb index 0768fbb528..c84629f9d0 100644 --- a/ext/psych/lib/psych/visitors/emitter.rb +++ b/ext/psych/lib/psych/visitors/emitter.rb @@ -1,8 +1,10 @@ module Psych module Visitors class Emitter < Psych::Visitors::Visitor - def initialize io + def initialize io, options = {} @handler = Psych::Emitter.new io + @handler.indentation = options[:indentation] if options[:indentation] + @handler.canonical = options[:canonical] if options[:canonical] end def visit_Psych_Nodes_Stream o |