Method: ChefAPI::ErrorCollection#add

Defined in:
lib/chef-api/error_collection.rb

#add(key, error) ⇒ self

Add a new error to the hash.

Parameters:

  • key (Symbol)

    the attribute key

  • error (String)

    the error message to push

Returns:

  • (self)


25
26
27
28
# File 'lib/chef-api/error_collection.rb', line 25

def add(key, error)
  self[key].push(error)
  self
end