Class: Vagrant::Config::V2::Util

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/config/v2/util.rb

Class Method Summary collapse

Class Method Details

.merge_errors(first, second) ⇒ Hash

This merges two error hashes from validate methods.

Parameters:

  • first (Hash)
  • second (Hash)

Returns:

  • (Hash)

    Merged result



10
11
12
13
14
15
16
17
# File 'lib/vagrant/config/v2/util.rb', line 10

def self.merge_errors(first, second)
  first.dup.tap do |result|
    second.each do |key, value|
      result[key] ||= []
      result[key] += value
    end
  end
end