Mercurial > repos > other > Puppet
annotate modules/stdlib/lib/puppet/functions/to_json.rb @ 478:adf6fe9bbc17
Update Puppet modules to latest versions
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 29 Aug 2024 18:47:29 +0100 |
parents | d9352a684e62 |
children |
rev | line source |
---|---|
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
1 # frozen_string_literal: true |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
2 |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
3 # THIS FILE WAS GENERATED BY `rake regenerate_unamespaced_shims` |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
4 |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
5 # @summary DEPRECATED. Use the namespaced function [`stdlib::to_json`](#stdlibto_json) instead. |
272 | 6 Puppet::Functions.create_function(:to_json) do |
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
7 dispatch :deprecation_gen do |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
8 repeated_param 'Any', :args |
272 | 9 end |
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
10 def deprecation_gen(*args) |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
11 call_function('deprecation', 'to_json', 'This function is deprecated, please use stdlib::to_json instead.', false) |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
12 call_function('stdlib::to_json', *args) |
272 | 13 end |
14 end |