diff options
author | Nick Walker <npwalker@users.noreply.github.com> | 2016-12-01 05:54:08 -0800 |
---|---|---|
committer | David Schmitt <david.schmitt@puppet.com> | 2016-12-01 13:54:08 +0000 |
commit | d3bbd3cbf89cb23bce4e55c3828e17c05c4cfd70 (patch) | |
tree | ea11726f3bfe7f5d6545075c83168547cbd3dc99 /lib | |
parent | cb59da2359f956e3dccec228e16f6b3aaa6758c4 (diff) |
Indicate that the type function is preferred (#695)
Prior to this commit, users coming to the type_of function would not realize that the type function in puppet does the same thing and is preferred over type_of.
After this commit, we have a comment indicating the above.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/functions/type_of.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/functions/type_of.rb b/lib/puppet/functions/type_of.rb index 02cdd4d..01f1f49 100644 --- a/lib/puppet/functions/type_of.rb +++ b/lib/puppet/functions/type_of.rb @@ -10,6 +10,8 @@ # 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. Puppet::Functions.create_function(:type_of) do def type_of(value) Puppet::Pops::Types::TypeCalculator.infer_set(value) |