Exception: PuppetMetadata::InvalidMetadataException

Inherits:
Exception
  • Object
show all
Defined in:
lib/puppet_metadata/metadata.rb

Overview

An exception indicating the metadata is invalid

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ InvalidMetadataException

Returns a new instance of InvalidMetadataException

Parameters:

  • errors (Array[Hash[Symbol, String]])

    The errors in the metadata



14
15
16
17
18
# File 'lib/puppet_metadata/metadata.rb', line 14

def initialize(errors)
  messages = errors.map { |error| error[:message] }
  super("Invalid metadata: #{messages.join(', ')}")
  @errors = errors
end

Instance Attribute Details

#errorsArray[Hash[Symbol, String]] (readonly)

The errors in the metadata

Returns:

  • (Array[Hash[Symbol, String]])

    the current value of errors



8
9
10
# File 'lib/puppet_metadata/metadata.rb', line 8

def errors
  @errors
end