diff options
Diffstat (limited to 'lib/oxidized/string.rb')
-rw-r--r-- | lib/oxidized/string.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/oxidized/string.rb b/lib/oxidized/string.rb index 9c09f61..64b7115 100644 --- a/lib/oxidized/string.rb +++ b/lib/oxidized/string.rb @@ -13,6 +13,11 @@ module Oxidized Oxidized::String.new each_line.to_a[1..-1].join end + # @return [Oxidized::String] copy of self with first and last lines removed + def cut_both + Oxidized::String.new each_line.to_a[1..-2].join + end + # sets @cmd and @name unless @name is already set def set_cmd command @cmd = command |