Puppet::Parser::Functions.newfunction(:defined_with_params,
:type => :rvalue,
- :doc => <<-'DOC'
- Takes a resource reference and an optional hash of attributes.
+ :doc => <<-DOC
+ @summary
+ Takes a resource reference and an optional hash of attributes.
- Returns true if a resource with the specified attributes has already been added
- to the catalog, and false otherwise.
+ Returns `true` if a resource with the specified attributes has already been added
+ to the catalog, and `false` otherwise.
- user { 'dan':
- ensure => present,
- }
+ ```
+ user { 'dan':
+ ensure => present,
+ }
- if ! defined_with_params(User[dan], {'ensure' => 'present' }) {
- user { 'dan': ensure => present, }
- }
+ if ! defined_with_params(User[dan], {'ensure' => 'present' }) {
+ user { 'dan': ensure => present, }
+ }
+ ```
+
+ @return [Boolean]
+ returns `true` or `false`
DOC
) do |vals|
reference, params = vals