From 67862310b2b868a037a0f457c07b3c655ec216d1 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Sun, 17 Jun 2018 20:47:45 +0200 Subject: document convenience methods (#1407) --- docs/Ruby-API.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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. -- cgit v1.2.1