Class: TTK::Dumpers::Yaml

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

Constant Summary collapse

MAP_SHIFT_WIDTH =
2
SEQ_SHIFT_WIDTH =
4

Instance Method Summary collapse

Methods inherited from Dumper

#flush

Constructor Details

#initialize(*a, &b) ⇒ Yaml

Returns a new instance of Yaml.



77
78
79
80
81
82
83
84
# File 'lib/ttk/dumpers/Yaml.rb', line 77

def initialize ( *a, &b )
  super
	@indent = ''
  @stack_indent = []
	@endl = true
  @io.puts '---'
  @opts = {:ttk => true}
end

Instance Method Details

#update(*a, &b) ⇒ Object



142
143
144
145
# File 'lib/ttk/dumpers/Yaml.rb', line 142

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