Exception: Chef::Exceptions::MultipleDscResourcesFound

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/chef/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(resources_found) ⇒ MultipleDscResourcesFound

Returns a new instance of MultipleDscResourcesFound.



529
530
531
# File 'lib/chef/exceptions.rb', line 529

def initialize(resources_found)
  super "Found multiple resources matching #{resources_found[0]["Module"]["Name"]}:\n#{(resources_found.map { |f| f["Module"]["Version"] }).uniq.join("\n")}"
end