Sha256: 9cf8821d669f3e63b99d078fbf63f510952d1e3f62d4ea1e1ae0f0b4ffdd4032

Contents?: true

Size: 428 Bytes

Versions: 5

Compression:

Stored size: 428 Bytes

Contents

# frozen_string_literal: true

module Recollect::Array
  module Startify
    def self.check!(item, iteratee, value)
      fetched_value = Utility::TryFetchOrBlank[item, iteratee]
      return false unless fetched_value

      regex = /^#{value}/
      fetched_value.to_s.match?(regex)
    end
  end

  module NotStartify
    def self.check!(item, iteratee, value)
      !Startify.check!(item, iteratee, value)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
recollect-array-0.1.4 lib/recollect/array/predicate/startify.rb
recollect-array-0.1.3 lib/recollect/array/predicate/startify.rb
recollect-array-0.1.2 lib/recollect/array/predicate/startify.rb
recollect-array-0.1.1 lib/recollect/array/predicate/startify.rb
recollect-array-0.1.0 lib/recollect/array/predicate/startify.rb