Skip to content

Commit 821a7c4

Browse files
(PUP-11767) Update inline documentation to no specify || for no arguments for receivers
1 parent 9afd00d commit 821a7c4

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

lib/puppet/interface.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def register(instance)
5151
# @param name [Symbol] the name of the face
5252
# @param version [String] the version of the face (this should
5353
# conform to {http://semver.org/ Semantic Versioning})
54-
# @overload define(name, version, {|| ... })
54+
# @overload define(name, version, { ... })
5555
# @return [Puppet::Interface] The created face
5656
# @api public
5757
# @dsl Faces

lib/puppet/interface/action_manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module Puppet::Interface::ActionManager
1313
# the methods on {Puppet::Interface::ActionBuilder}.
1414
# @param name [Symbol] The name that will be used to invoke the
1515
# action
16-
# @overload action(name, {|| block})
16+
# @overload action(name, { block })
1717
# @return [void]
1818
# @api public
1919
# @dsl Faces

lib/puppet/parameter.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class << self
7272
# @overload defaultto(value)
7373
# Defines the default value with a literal value
7474
# @param value [Object] the literal value to use as the default value
75-
# @overload defaultto({|| ... })
75+
# @overload defaultto({ ... })
7676
# Defines that the default value is produced by the given block. The given block
7777
# should produce the default value.
7878
# @raise [Puppet::DevError] if value is nil, and no block is given.
@@ -164,7 +164,7 @@ def initvars
164164
@value_collection = ValueCollection.new
165165
end
166166

167-
# @overload munge {|| ... }
167+
# @overload munge { ... }
168168
# Defines an optional method used to convert the parameter value from DSL/string form to an internal form.
169169
# If a munge method is not defined, the DSL/string value is used as is.
170170
# @note This adds a method with the name `unsafe_munge` in the created parameter class. Later this method is
@@ -180,7 +180,7 @@ def munge(&block)
180180
define_method(:unsafe_munge, &block)
181181
end
182182

183-
# @overload unmunge {|| ... }
183+
# @overload unmunge { ... }
184184
# Defines an optional method used to convert the parameter value from internal form to DSL/string form.
185185
# If an `unmunge` method is not defined, the internal form is used.
186186
# @see munge
@@ -240,7 +240,7 @@ def required?
240240
@required
241241
end
242242

243-
# @overload validate {|| ... }
243+
# @overload validate { ... }
244244
# Defines an optional method that is used to validate the parameter's DSL/string value.
245245
# Validation should raise appropriate exceptions, the return value of the given block is ignored.
246246
# The easiest way to raise an appropriate exception is to call the method {Puppet::Util::Errors.fail} with

lib/puppet/provider.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def self.optional_commands(hash)
195195
# @param name [Symbol] The name of the command (will become the name of the generated method that executes the command)
196196
# @param path [String] The path to the executable for the command
197197
# @yield [ ] A block that configures the command (see {Puppet::Provider::Command})
198-
# @comment a yield [ ] produces {|| ...} in the signature, do not remove the space.
198+
# @comment a yield [ ] produces { ... } in the signature, do not remove the space.
199199
# @note the name ´has_command´ looks odd in an API context, but makes more sense when seen in the internal
200200
# DSL context where a Provider is declaratively defined.
201201
# @api public

lib/puppet/type.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def self.eachmetaparam
184184
# specification to clearly state that the type is ensurable.
185185
#
186186
# @overload ensurable()
187-
# @overload ensurable({|| ... })
187+
# @overload ensurable({ ... })
188188
# @yield [ ] A block evaluated in scope of the new Parameter
189189
# @yieldreturn [void]
190190
# @return [void]
@@ -1987,16 +1987,16 @@ def provider=(name)
19871987
# requirement.
19881988
#
19891989
# @example Autorequire the files File['foo', 'bar']
1990-
# autorequire( 'file', {|| ['foo', 'bar'] })
1990+
# autorequire( 'file', { ['foo', 'bar'] })
19911991
#
19921992
# @example Autobefore the files File['foo', 'bar']
1993-
# autobefore( 'file', {|| ['foo', 'bar'] })
1993+
# autobefore( 'file', { ['foo', 'bar'] })
19941994
#
19951995
# @example Autosubscribe the files File['foo', 'bar']
1996-
# autosubscribe( 'file', {|| ['foo', 'bar'] })
1996+
# autosubscribe( 'file', { ['foo', 'bar'] })
19971997
#
19981998
# @example Autonotify the files File['foo', 'bar']
1999-
# autonotify( 'file', {|| ['foo', 'bar'] })
1999+
# autonotify( 'file', { ['foo', 'bar'] })
20002000
#
20012001
# @param name [String] the name of a type of which one or several resources should be autorelated e.g. "file"
20022002
# @yield [ ] a block returning list of names of given type to auto require

0 commit comments

Comments
 (0)