Sha256: a2ee5e9fb56e894054d57a72fa79c2f41639be977f80f84f4982e969dce53486
Contents?: true
Size: 488 Bytes
Versions: 2
Compression:
Stored size: 488 Bytes
Contents
# Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the MIT license. module Ramaze module CoreExtensions # Extensions for String module String unless ''.respond_to?(:end_with?) # Compatibility with 1.9 def end_with?(other) other = other.to_s self[-other.size, other.size] == other end end end # String end # CoreExtensions end # Ramaze
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ramaze-2012.04.14 | lib/ramaze/snippets/string/end_with.rb |
ramaze-2012.03.07 | lib/ramaze/snippets/string/end_with.rb |