Module: TreasureData::CompactFormatYamler

Defined in:
lib/td/compact_format_yamler.rb

Defined Under Namespace

Modules: Visitors

Class Method Summary collapse

Class Method Details

.dump(o, io = nil, options = {}) ⇒ Object



30
31
32
33
34
35
36
37
38
39
# File 'lib/td/compact_format_yamler.rb', line 30

def self.dump(o, io = nil, options = {})
  if Hash === io
    options = io
    io = nil
  end

  visitor = ::TreasureData::CompactFormatYamler::Visitors::YAMLTree.create options
  visitor << o
  visitor.tree.yaml io, options
end