Class: OHash

Inherits:
Hash show all
Defined in:
lib/ttk/dumpers/Yaml.rb,
lib/ttk/logger/to_ttk_log.rb

Instance Method Summary collapse

Methods inherited from Hash

#hash_to_ttk_log, #symtbl_gsub, #testify, #tsort_each_child, #tsort_each_from, #tsort_from

Instance Method Details

#to_ttk_log(log) ⇒ Object



57
58
59
# File 'lib/ttk/logger/to_ttk_log.rb', line 57

def to_ttk_log ( log )
  hash_to_ttk_log(log, :seq)
end

#to_yaml(opts = {}) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/ttk/dumpers/Yaml.rb', line 51

def to_yaml ( opts={} )
  if opts[:ttk]
    YAML::quick_emit(self.object_id, opts) do |out|
      out.seq('') do |seq|
        self.each do |k,v|
          seq.add( { k => v } )
        end
      end
    end
  else
    super
  end
end