Method: J8::Predicate#and

Defined in:
lib/j8/predicate.rb

#and(other = nil, &block) ⇒ Object



19
20
21
22
23
# File 'lib/j8/predicate.rb', line 19

def and(other = nil, &block)
  callable = from_callable(other, block)

  J8::Predicate.new(->(o) { test(o) && callable.test(o) })
end