summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorRob Fugina <rfugina@genome.wustl.edu>2014-11-17 16:01:42 -0600
committerRob Fugina <rfugina@genome.wustl.edu>2014-12-17 12:39:40 -0600
commitef3d42f7bbdf95b21f46e580de309298cad300ea (patch)
treed4cf331b1ff8c7b10974cd8d20325272268d3182 /README.markdown
parentc5467cc507c004d75037d07c70633d1e743825af (diff)
Added basename() based on Ruby's File.basename
Based on dirname code. Includes RSpec tests and docs.
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 78839c6..67ef313 100644
--- a/README.markdown
+++ b/README.markdown
@@ -84,6 +84,13 @@ If you want to use a standardized set of run stages for Puppet, `include stdlib`
Requires an action ('encode', 'decode') and either a plain or base64-encoded
string. *Type*: rvalue
+* `basename`: Returns the `basename` of a path (optionally stripping an extension). For example:
+ * ('/path/to/a/file.ext') returns 'file.ext'
+ * ('relative/path/file.ext') returns 'file.ext'
+ * ('/path/to/a/file.ext', '.ext') returns 'file'
+
+ *Type*: rvalue
+
* `bool2num`: Converts a boolean to a number. Converts values:
* 'false', 'f', '0', 'n', and 'no' to 0.
* 'true', 't', '1', 'y', and 'yes' to 1.