summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorWild Kat <wk@users.noreply.github.com>2018-06-17 20:47:45 +0200
committerGitHub <noreply@github.com>2018-06-17 20:47:45 +0200
commit67862310b2b868a037a0f457c07b3c655ec216d1 (patch)
tree29b8bf4b778993795c792c82db4fe8df3b355def /docs
parent81b0b57ff91c5578bbdc8bf239cd6f2853932fbd (diff)
document convenience methods (#1407)
Diffstat (limited to 'docs')
-rw-r--r--docs/Ruby-API.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/Ruby-API.md b/docs/Ruby-API.md
index f3f488a..a9e130a 100644
--- a/docs/Ruby-API.md
+++ b/docs/Ruby-API.md
@@ -164,3 +164,19 @@ Resets the existing block, allowing the user to completely override its contents
Ensures that the contents of the block are prepended, rather than appended (the
default) to an existing block.
+
+### `String` convenience methods
+
+Since configuration processing tasks are occasionally similar across models,
+Oxidized provides an extended [`String`](/lib/oxidized/string.rb) class with the
+intention of providing convenience methods and eliminating code duplication.
+
+#### `cut_tail`
+
+Returns a multi-line string without the last line, or an empty string if only a
+single line was present.
+
+#### `cut_head`
+
+Returns a multi-line string without the first line, or an empty string if only a
+single line was present.