Method: Assertion::DSL::Inversion#not

Defined in:
lib/assertion/dsl/inversion.rb

#notAssertion::Inverter

Initializes the intermediate inverter with new and [] methods

The inverter can be used to initialize the assertion, that describes just the opposite statement to the current one

Examples:

IsAdult = Assertion.about :name, :age do
  age >= 18
end

joe = { name: 'Joe', age: 19 }

IsAdult[joe].valid?     # => true
IsAdult.not[joe].valid? # => false

Returns:



28
29
30
# File 'lib/assertion/dsl/inversion.rb', line 28

def not
  Inverter.new(self)
end