Method: Puppet::Parameter.doc

Defined in:
lib/puppet/parameter.rb

.docString

Produces a documentation string. If an enumeration of _valid values_ has been defined, it is appended to the documentation for this parameter specified with the desc method.

Returns:

  • Returns a documentation string.

API:

  • public



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/puppet/parameter.rb', line 112

def doc
  @doc ||= ""

  unless defined?(@addeddocvals)
    @doc = Puppet::Util::Docs.scrub(@doc)
    vals = value_collection.doc
    if vals
      @doc << "\n\n#{vals}"
    end

    features = required_features
    if features
      @doc << "\n\nRequires features #{features.flatten.collect(&:to_s).join(' ')}."
    end
    @addeddocvals = true
  end

  @doc
end