Class: Oxidized::String
- Inherits:
-
String
- Object
- String
- Oxidized::String
- Defined in:
- lib/oxidized/string.rb
Overview
Used in models, contains convenience methods
Instance Method Summary collapse
-
#cut_head ⇒ Oxidized::String
Copy of self with first line removed.
-
#cut_tail ⇒ Oxidized::String
Copy of self with last line removed.
Instance Method Details
#cut_head ⇒ Oxidized::String
Returns copy of self with first line removed.
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_tail ⇒ Oxidized::String
Returns copy of self with last line removed.
5 6 7 |
# File 'lib/oxidized/string.rb', line 5 def cut_tail Oxy::String.new each_line.to_a[0..-2].join end |