X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Ffunctions%2Ffact.rb;h=c963d16650be0753008892a7e6c523ef5c29eb04;hp=48736ad3f4fa9a35645a0696253f2d790e101795;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/functions/fact.rb b/3rdparty/modules/stdlib/lib/puppet/functions/fact.rb index 48736ad3f..c963d1665 100644 --- a/3rdparty/modules/stdlib/lib/puppet/functions/fact.rb +++ b/3rdparty/modules/stdlib/lib/puppet/functions/fact.rb @@ -1,19 +1,25 @@ -# Digs into the facts hash using dot-notation +# @summary +# Digs into the facts hash using dot-notation # -# Example usage: +# Supports the use of dot-notation for referring to structured facts. If a fact requested +# does not exist, returns Undef. # +# @example Example usage: # fact('osfamily') # fact('os.architecture') # -# Array indexing: -# +# @example Array indexing: # fact('mountpoints."/dev".options.1') # -# Fact containing a "." in the name: -# +# @example Fact containing a "." in the name: # fact('vmware."VRA.version"') # Puppet::Functions.create_function(:fact) do + # @param fact_name + # The name of the fact to check + # + # @return + # All information retrieved on the given fact_name dispatch :fact do param 'String', :fact_name end