Skip to content

Commit 200ec22

Browse files
committed
Document return type for puppet 4.x functions
1 parent 5b3f595 commit 200ec22

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

REFERENCE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ data looked up in trocla
308308
The `trocla_gsub` replaces %%TROCLA_[\w_\-]+%% place holders with
309309
data looked up in trocla
310310

311-
Returns: `Any`
311+
Returns: `String`
312312

313313
##### `data`
314314

@@ -404,7 +404,7 @@ The `trocla_lookup_key` is a hiera 5 `lookup_key` data provider function.
404404

405405
The `trocla_lookup_key` is a hiera 5 `lookup_key` data provider function.
406406

407-
Returns: `Any`
407+
Returns: `String`
408408

409409
##### `key`
410410

lib/puppet/functions/trocla/gsub.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
dispatch :trocla_gsub do
88
param 'String', :data
99
optional_param 'Struct[{ prefix => Optional[String] }]', :options
10+
return_type 'String'
1011
end
1112

1213
def trocla_gsub(data, options = {})

lib/puppet/functions/trocla_lookup_key.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
param 'Variant[String, Numeric]', :key
1717
param 'Hash', :options
1818
param 'Puppet::LookupContext', :context
19+
return_type 'String'
1920
end
2021

2122
def trocla_lookup_key(key, options, context)

0 commit comments

Comments
 (0)