vendor/bundle/ruby/1.8/gems/inifile-1.1.0/lib/inifile.rb
#
# call-seq:
#   merge!( other_inifile )
#
# Merges other_inifile into this inifile, overwriting existing entries.
# Useful for having a system inifile with user overridable settings elsewhere.
#
call-seq:
merge!( other_inifile )

Merges other_inifile into this inifile, overwriting existing entries.
Useful for having a system inifile with user overridable settings elsewhere.
call - seq : merge! ( other_inifile ) Merges other_inifile into this inifile overwriting existing entries . Useful for having a system inifile with user overridable settings elsewhere .
def merge!( other )
    my_keys = @ini.keys
    other_keys =
        case other
        when IniFile; other.instance_variable_get(:@ini).keys
        when Hash; other.keys
        else raise "cannot merge contents from '#{other.class.name}'" end
    (my_keys & other_keys).each do |key|
      @ini[key].merge!(other[key])
    end
    (other_keys - my_keys).each do |key|
      @ini[key] = other[key]
    end
    self
  end
def merge! ( other ) my_keys = @ini . keys other_keys = case other when IniFile ; other . instance_variable_get ( :@ini ) . keys when Hash ; other . keys else raise "cannot merge contents from '#{other.class.name}'" end ( my_keys & other_keys ) . each do | key | @ini [ key ] . merge! ( other [ key ] ) end ( other_keys - my_keys ) . each do | key | @ini [ key ] = other [ key ] end self end
call-seq:
merge!
call - seq : merge!
other