Class: OHash

Inherits:
Hash show all
Defined in:
lib/uttk/dumpers/Yaml.rb,
lib/uttk/logger/to_uttk_log.rb

Instance Method Summary collapse

Methods inherited from Hash

#testify, #to_uttk_log, #tsort_each_child, #tsort_each_from, #tsort_from, #uttk_each

Instance Method Details

#to_uttk_log_with_key(key, log) ⇒ Object



59
60
61
# File 'lib/uttk/logger/to_uttk_log.rb', line 59

def to_uttk_log_with_key ( key, log )
  super key, log, :ordered => true
end

#to_yaml(opts = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/uttk/dumpers/Yaml.rb', line 18

def to_yaml ( opts={} )
  if YAML.have_option? opts, :uttk
    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