Method: Enumerable#none?

Defined in:
lib/passive_support/core_ext/enumerable.rb

#none?(&block) ⇒ Boolean

Returns true if none of the elements match the given block.

success = responses.none? {|r| r.status / 100 == 5 }

This is a builtin method in Ruby 1.8.7 and later.

Returns:

  • (Boolean)


111
112
113
# File 'lib/passive_support/core_ext/enumerable.rb', line 111

def none?(&block)
  !any?(&block)
end