diff options
Diffstat (limited to 'lib/puppet/functions/is_numeric.rb')
-rw-r--r-- | lib/puppet/functions/is_numeric.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/functions/is_numeric.rb b/lib/puppet/functions/is_numeric.rb new file mode 100644 index 0000000..3a0f0cd --- /dev/null +++ b/lib/puppet/functions/is_numeric.rb @@ -0,0 +1,10 @@ +Puppet::Functions.create_function(:is_numeric, Puppet::Functions::InternalFunction) do + dispatch :deprecation_gen do + scope_param + optional_repeated_param 'Any', :args + end + def deprecation_gen(scope, *args) + call_function('deprecation', 'is_numeric', "This method is deprecated, please use match expressions with Stdlib::Compat::Numeric instead. They are described at https://docs.puppet.com/puppet/latest/reference/lang_data_type.html#match-expressions.") + scope.send("function_is_numeric", args) + end +end |