Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/core_extend/hash.rb

Instance Method Summary collapse

Instance Method Details

#to_yaml(opts = {}) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/core_extend/hash.rb', line 2

def to_yaml(opts = {})
  YAML::quick_emit(object_id, opts) do |out|
    out.map(taguri, to_yaml_style) do |map|
      sort.each do |k, v| # "sort" added
        map.add(k, v)
      end
    end
  end
end