Class: Uttk::Dumpers::Yaml

Inherits:
Dumper show all
Includes:
Concrete
Defined in:
lib/uttk/dumpers/Yaml.rb

Constant Summary collapse

MAP_INDENT =
2
MAP_SHIFT =
' ' * MAP_INDENT
OMAP_SHIFT =
' ' * 4

Instance Attribute Summary

Attributes inherited from Dumper

#options

Instance Method Summary collapse

Methods inherited from Dumper

#<<, #each_output, #flush, #print, #puts

Constructor Details

#initialize(*a, &b) ⇒ Yaml

Returns a new instance of Yaml.



45
46
47
48
49
50
51
52
# File 'lib/uttk/dumpers/Yaml.rb', line 45

def initialize ( *a, &b )
  super
  @indent = ''
  @stack_indent = []
  @endl = true
  @start = false
  @opts = {:uttk => true, :Inline => true}
end

Instance Method Details

#puts_headerObject



130
131
132
133
134
135
# File 'lib/uttk/dumpers/Yaml.rb', line 130

def puts_header
  unless @start
    puts '---'
    @start = true
  end
end

#update(*a, &b) ⇒ Object



138
139
140
141
# File 'lib/uttk/dumpers/Yaml.rb', line 138

def update ( *a, &b )
  super
  flush
end