Class: Oxidized::String

Inherits:
String
  • Object
show all
Defined in:
lib/oxidized/string.rb

Overview

Used in models, contains convenience methods

Instance Method Summary collapse

Instance Method Details

#cut_headOxidized::String

Returns copy of self with first line removed.

Returns:



9
10
11
# File 'lib/oxidized/string.rb', line 9

def cut_head
  Oxy::String.new each_line.to_a[1..-1].join
end

#cut_tailOxidized::String

Returns copy of self with last line removed.

Returns:



5
6
7
# File 'lib/oxidized/string.rb', line 5

def cut_tail
  Oxy::String.new each_line.to_a[0..-2].join
end