summaryrefslogtreecommitdiff
path: root/lib/puppet/functions/is_bool.rb
blob: ff1d4627f3aad3b01d2c4f5cd63b3ca78201d932 (plain)
1
2
3
4
5
6
7
8
9
10
Puppet::Functions.create_function(:is_bool, 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_bool', "This method is deprecated, please use match expressions with Stdlib::Compat::Bool instead. They are described at https://docs.puppet.com/puppet/latest/reference/lang_data_type.html#match-expressions.")
    scope.send("function_is_bool", args)
  end
end