module TrickBag::Functional
Public Instance Methods
all_with_object?(conditions, object)
click to toggle source
Returns whether or not all of the condition lambdas return true when passed the specified object
# File lib/trick_bag/functional/functional.rb, line 19 def all_with_object?(conditions, object) conditions.all? { |condition| condition.(object) } end
any_with_object?(conditions, object)
click to toggle source
Returns whether or not any of the condition lambdas return true when passed the specified object
# File lib/trick_bag/functional/functional.rb, line 26 def any_with_object?(conditions, object) conditions.any? { |condition| condition.(object) } end
none_with_object?(conditions, object)
click to toggle source
Returns whether or not none of the condition lambdas return true when passed the specified object
# File lib/trick_bag/functional/functional.rb, line 12 def none_with_object?(conditions, object) conditions.none? { |condition| condition.(object) } end