Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / lib / puppet / parser / functions / try_get_value.rb
index 34f9476..26c0b2d 100644 (file)
@@ -7,14 +7,16 @@ module Puppet::Parser::Functions
     :type => :rvalue,
     :arity => -2,
     :doc => <<-DOC
     :type => :rvalue,
     :arity => -2,
     :doc => <<-DOC
-      DEPRECATED: this function is deprecated, please use dig() instead.
+      @summary
+        **DEPRECATED:** this function is deprecated, please use dig() instead.
 
 
-      Looks up into a complex structure of arrays and hashes and returns a value
-      or the default value if nothing was found.
+      @return
+        Looks up into a complex structure of arrays and hashes and returns a value
+        or the default value if nothing was found.
 
       Key can contain slashes to describe path components. The function will go down
       the structure and try to extract the required value.
 
       Key can contain slashes to describe path components. The function will go down
       the structure and try to extract the required value.
-
+      ``
       $data = {
         'a' => {
           'b' => [
       $data = {
         'a' => {
           'b' => [
@@ -27,13 +29,15 @@ module Puppet::Parser::Functions
 
       $value = try_get_value($data, 'a/b/2', 'not_found', '/')
       => $value = 'b3'
 
       $value = try_get_value($data, 'a/b/2', 'not_found', '/')
       => $value = 'b3'
-
+      ```
+      ```
       a -> first hash key
       b -> second hash key
       2 -> array index starting with 0
 
       not_found -> (optional) will be returned if there is no value or the path did not match. Defaults to nil.
       / -> (optional) path delimiter. Defaults to '/'.
       a -> first hash key
       b -> second hash key
       2 -> array index starting with 0
 
       not_found -> (optional) will be returned if there is no value or the path did not match. Defaults to nil.
       / -> (optional) path delimiter. Defaults to '/'.
+      ```
 
       In addition to the required "key" argument, "try_get_value" accepts default
       argument. It will be returned if no value was found or a path component is
 
       In addition to the required "key" argument, "try_get_value" accepts default
       argument. It will be returned if no value was found or a path component is