Sha256: 68b423984360bb66230131a0e4bdb66dc7795ab240c5d6d49398e4a7aeb6415c

Contents?: true

Size: 333 Bytes

Versions: 4

Compression:

Stored size: 333 Bytes

Contents

module Ramaze
  module CoreExtensions
    # Extensions for String
    module String
      unless ''.respond_to?(:start_with?)
        # Compatibility with 1.9
        def start_with?(other)
          other = other.to_s
          self[0, other.size] == other
        end
      end
    end # String
  end # CoreExtensions
end # Ramaze

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ramaze-2012.04.14 lib/ramaze/snippets/string/start_with.rb
ramaze-2012.03.07 lib/ramaze/snippets/string/start_with.rb
ramaze-2011.12.28 lib/ramaze/snippets/string/start_with.rb
ramaze-2011.10.23 lib/ramaze/snippets/string/start_with.rb