Sha256: 3c3bf60adaf98ff26ea906950b17fb16174ce7e80cce62eb5f56b0bd9beb894b
Contents?: true
Size: 956 Bytes
Versions: 2
Compression:
Stored size: 956 Bytes
Contents
# encoding: utf-8 module Veritas class Function class Predicate # A mixin for predicates matching an enumerable module Enumerable # Return the method to test the enumerable with # # @param [#cover?, #include?] enumerable # # @return [Symbol] # # @api private def self.compare_method(enumerable) enumerable.respond_to?(:cover?) ? :cover? : :include? end # Initialize an Enumerable predicate # # @param [Object] left # the attribute or object to test for in the Enumerable # @param [Enumerable] right # the enumerable to test # # @return [undefined] # # @api private def initialize(left, right) super(left, Immutable.freeze_object(right)) end end # module Enumerable end # class Predicate end # class Function end # module Veritas
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.5 | lib/veritas/function/predicate/enumerable.rb |
veritas-0.0.4 | lib/veritas/function/predicate/enumerable.rb |