Puppet Function: type_of
- Defined in:
- lib/puppet/functions/type_of.rb
- Function type:
- Ruby 4.x API
Summary
Returns the type of the passed value.Overview
See the documentation for “The Puppet Type System” for more information about types. See the ‘assert_type()` function for flexible ways to assert the type of a value.
The built-in type() function in puppet is generally preferred over this function this function is provided for backwards compatibility.
18 19 20 21 22 23 24 25 26 |
# File 'lib/puppet/functions/type_of.rb', line 18 Puppet::Functions.create_function(:type_of) do # @return [String] # the type of the passed value # # @param value def type_of(value) Puppet::Pops::Types::TypeCalculator.infer_set(value) end end |