Class: OHash

Inherits:
Object show all
Defined in:
lib/uttk/dumpers/Yaml.rb

Instance Method Summary collapse

Instance Method Details

#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