Class: Array

Inherits:
Object show all
Defined in:
lib/must_be.rb,
lib/must_be.rb

Instance Method Summary collapse

Instance Method Details

#drop_whileObject



28
29
30
31
32
# File 'lib/must_be.rb', line 28

def drop_while 
  index = 0
  index += 1 while yield(self[index])
  self[index..-1]
end

#none?(&block) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/must_be.rb', line 20

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