diff options
Diffstat (limited to 'lib/puppet/reference/type.rb')
-rw-r--r-- | lib/puppet/reference/type.rb | 73 |
1 files changed, 36 insertions, 37 deletions
diff --git a/lib/puppet/reference/type.rb b/lib/puppet/reference/type.rb index 335f4a41a..c18681c1f 100644 --- a/lib/puppet/reference/type.rb +++ b/lib/puppet/reference/type.rb @@ -10,64 +10,63 @@ type = Puppet::Util::Reference.newreference :type, :doc => "All Puppet resource str = %{ -Resource Types --------------- + Resource Types + -------------- -- The *namevar* is the parameter used to uniquely identify a type instance. - This is the parameter that gets assigned when a string is provided before - the colon in a type declaration. In general, only developers will need to - worry about which parameter is the ``namevar``. + - The *namevar* is the parameter used to uniquely identify a type instance. + This is the parameter that gets assigned when a string is provided before + the colon in a type declaration. In general, only developers will need to + worry about which parameter is the ``namevar``. - In the following code:: + In the following code:: - file { "/etc/passwd": - owner => root, - group => root, - mode => 644 - } + file { "/etc/passwd": + owner => root, + group => root, + mode => 644 + } - ``/etc/passwd`` is considered the title of the file object (used for things like - dependency handling), and because ``path`` is the namevar for ``file``, that - string is assigned to the ``path`` parameter. + ``/etc/passwd`` is considered the title of the file object (used for things like + dependency handling), and because ``path`` is the namevar for ``file``, that + string is assigned to the ``path`` parameter. - *Parameters* determine the specific configuration of the instance. They either - directly modify the system (internally, these are called properties) or they affect - how the instance behaves (e.g., adding a search path for ``exec`` instances - or determining recursion on ``file`` instances). + directly modify the system (internally, these are called properties) or they affect + how the instance behaves (e.g., adding a search path for ``exec`` instances or determining recursion on ``file`` instances). - *Providers* provide low-level functionality for a given resource type. This is - usually in the form of calling out to external commands. + usually in the form of calling out to external commands. - When required binaries are specified for providers, fully qualifed paths - indicate that the binary must exist at that specific path and unqualified - binaries indicate that Puppet will search for the binary using the shell - path. + When required binaries are specified for providers, fully qualifed paths + indicate that the binary must exist at that specific path and unqualified + binaries indicate that Puppet will search for the binary using the shell + path. - *Features* are abilities that some providers might not support. You can use the list - of supported features to determine how a given provider can be used. + of supported features to determine how a given provider can be used. - Resource types define features they can use, and providers can be tested to see - which features they provide. + Resource types define features they can use, and providers can be tested to see + which features they provide. - } + } - types.sort { |a,b| - a.to_s <=> b.to_s - }.each { |name,type| + types.sort { |a,b| + a.to_s <=> b.to_s + }.each { |name,type| - str += " + str += " ---------------- " - str += h(name, 3) - str += scrub(type.doc) + "\n\n" + str += h(name, 3) + str += scrub(type.doc) + "\n\n" - # Handle the feature docs. - if featuredocs = type.featuredocs - str += h("Features", 4) - str += featuredocs + # Handle the feature docs. + if featuredocs = type.featuredocs + str += h("Features", 4) + str += featuredocs end docs = {} |