module Kernel

Public Instance Methods

insist(&block) click to toggle source

A shortcut to ‘Insist.new’

Example:

insist { "hello world" } != "fizzle"
# File lib/insist.rb, line 65
def insist(&block)
  return Insist.new(&block)
end
reject(&block) click to toggle source

A shortcut to ‘Reject.new’

Example:

# This will fail (raises Insist::Failure)
reject { [1,2,3,4] }.include?(3)

# This will succeed
reject { [1,2,3,4] }.include?(4)
# File lib/insist.rb, line 78
def reject(&block)
  return Reject.new(&block)
end