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:

  • (String)

    Returns a documentation string.



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/puppet/parameter.rb', line 102

def doc
  @doc ||= ""

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

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

  @doc
end