Method: Puppet::Pops::Issues.issue

Defined in:
lib/puppet/pops/issues.rb

.issue(issue_code, *args, &block) ⇒ Object

Defines an issue with the given issue_code, additional required parameters, and a block producing a message. The block is evaluated in the context of a MessageData which provides convenient access to all required arguments via accessor methods. In addition to accessors for specified arguments, these are also available:

  • label - a LabelProvider that provides human understandable names for model elements and production of article (a/an/the).

  • semantic - the model element for which the issue is reported

Parameters:

  • issue_code (Symbol)

    the issue code for the issue used as an identifier, should be the same as the constant the issue is bound to.

  • args (Symbol)

    required arguments that must be passed when formatting the message, may be empty

  • block (Proc)

    a block producing the message string, evaluated in a MessageData scope. The produced string should not end with a period as additional information may be appended.

See Also:



126
127
128
# File 'lib/puppet/pops/issues.rb', line 126

def self.issue(issue_code, *args, &block)
  Issue.new(issue_code, *args, &block)
end