Sha256: 885398df3ccfcddf015a59828816bf97d2c546802e18870611ad106e18fb9fb1
Contents?: true
Size: 597 Bytes
Versions: 3
Compression:
Stored size: 597 Bytes
Contents
# frozen_string_literal: true class Revector module Endify def self.check!(item, iteratee, value) fetched_value = Utility::TryFetchOrBlank[item, iteratee] return false unless fetched_value compare(fetched_value, value) end def self.compare(fetched_value, value) regex = /#{value}$/ fetched_value.to_s.match?(regex) end end module NotEndify def self.check!(item, iteratee, value) !Endify.check!(item, iteratee, value) end def self.compare(fetched_value, value) !Endify.compare(fetched_value, value) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
revector-0.1.2 | lib/revector/predicate/endify.rb |
revector-0.1.1 | lib/revector/predicate/endify.rb |
revector-0.1.0 | lib/revector/predicate/endify.rb |