From 7f98203f1863288675d8fa48e2830efca5e26324 Mon Sep 17 00:00:00 2001 From: Chris Boot Date: Thu, 27 Jun 2013 17:51:36 +0100 Subject: ensure_resource: fix documentation typo --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.markdown') diff --git a/README.markdown b/README.markdown index 0e40f51..2a1ddfd 100644 --- a/README.markdown +++ b/README.markdown @@ -258,7 +258,7 @@ resource. This example only creates the resource if it does not already exist: - ensure_resource('user, 'dan', {'ensure' => 'present' }) + ensure_resource('user', 'dan', {'ensure' => 'present' }) If the resource already exists but does not match the specified parameters, this function will attempt to recreate the resource leading to a duplicate -- cgit v1.2.3 From 206941520467a5cbf1ba4131c68c4814b5ab181a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Tomulik?= Date: Mon, 29 Jul 2013 11:30:47 +0200 Subject: added delete_values() and delete_undef_values() functions --- README.markdown | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'README.markdown') diff --git a/README.markdown b/README.markdown index 2a1ddfd..1e51e1d 100644 --- a/README.markdown +++ b/README.markdown @@ -202,6 +202,33 @@ Deletes a determined indexed value from an array. Would return: ['a','c'] +- *Type*: rvalue + +delete_values +------------- +Deletes all instances of a given value from a hash. + +*Examples:* + + delete_values({'a'=>'A','b'=>'B','c'=>'C','B'=>'D'}, 'B') + +Would return: {'a'=>'A','c'=>'C','B'=>'D'} + + +delete_undef_values +------------------- +Deletes all instances of the undef value from an array or hash. + +*Examples:* + + $hash = delete_undef_values({a=>'A', b=>'', c=>undef, d => false}) + +Would return: {a => 'A', b => '', d => false} + + $array = delete_undef_values(['A','',undef,false]) + +Would return: ['A','',false] + - *Type*: rvalue difference -- cgit v1.2.3