Module: Gemmy::Patches::ArrayPatch::InstanceMethods::AnyNot
- Defined in:
- lib/gemmy/patches/array_patch.rb
Instance Method Summary collapse
-
#any_not?(&blk) ⇒ Boolean
checks if any of the results of an array do not respond truthily to a block.
Instance Method Details
#any_not?(&blk) ⇒ Boolean
checks if any of the results of an array do not respond truthily to a block
For example, to check if any items of an array are truthy:
[false, nil, ''].any_not? &:blank?
=> false
248 249 250 |
# File 'lib/gemmy/patches/array_patch.rb', line 248 def any_not?(&blk) any? { |item| ! blk.call(item) } end |