Skip to content

Commit 1c943f7

Browse files
committed
Fix return value documentation on dispatch call
[warn]: The docstring for Puppet 4.x function 'foo' contains @return tags near lib/puppet/functions/foo.rb:42: return value documentation should be made on the dispatch call. [warn]: Missing @return tag near lib/puppet/functions/foo.rb:42.
1 parent dd36542 commit 1c943f7

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

lib/puppet/functions/parsehocon.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
# This function accepts HOCON as a string and converts it into the correct
55
# Puppet structure
66
#
7-
# @return
8-
# Data
9-
#
107
# @example How to parse hocon
118
# $data = parsehocon("{any valid hocon: string}")
129
#
1310
Puppet::Functions.create_function(:parsehocon) do
1411
# @param hocon_string A valid HOCON string
1512
# @param default An optional default to return if parsing hocon_string fails
13+
# @return [Data]
1614
dispatch :parsehocon do
1715
param 'String', :hocon_string
1816
optional_param 'Any', :default

lib/puppet/functions/to_python.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
# }
1616

1717
Puppet::Functions.create_function(:to_python) do
18-
dispatch :to_python do
19-
param 'Any', :object
20-
end
21-
2218
# @param object
2319
# The object to be converted
2420
#
2521
# @return [String]
2622
# The String representation of the object
23+
dispatch :to_python do
24+
param 'Any', :object
25+
end
26+
2727
def to_python(object)
2828
serialized = Puppet::Pops::Serialization::ToDataConverter.convert(object, rich_data: true)
2929
serialized_to_python(serialized)

lib/puppet/functions/to_ruby.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
# }
1616

1717
Puppet::Functions.create_function(:to_ruby) do
18-
dispatch :to_ruby do
19-
param 'Any', :object
20-
end
21-
2218
# @param object
2319
# The object to be converted
2420
#
2521
# @return [String]
2622
# The String representation of the object
23+
dispatch :to_ruby do
24+
param 'Any', :object
25+
end
26+
2727
def to_ruby(object)
2828
serialized = Puppet::Pops::Serialization::ToDataConverter.convert(object, rich_data: true)
2929
serialized_to_ruby(serialized)

0 commit comments

Comments
 (0)