Sha256: e1328489907ba7bb75907db527b94ce7f0f87c4d9e490ca990a375f14e51eece

Contents?: true

Size: 396 Bytes

Versions: 4

Compression:

Stored size: 396 Bytes

Contents

module Oxidized
  # Used in models, contains convenience methods
  class String < String
    # @return [Oxidized::String] copy of self with last line removed
    def cut_tail
      Oxidized::String.new each_line.to_a[0..-2].join
    end
    # @return [Oxidized::String] copy of self with first line removed
    def cut_head
      Oxidized::String.new each_line.to_a[1..-1].join
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
oxidized-0.2.3 lib/oxidized/string.rb
oxidized-0.2.2 lib/oxidized/string.rb
oxidized-0.2.1 lib/oxidized/string.rb
oxidized-0.2.0 lib/oxidized/string.rb