module Assertion::DSL::Inversion
Allows to provide inverter for objects of the current class
Public Instance Methods
not()
click to toggle source
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
@example
IsAdult = Assertion.about :name, :age do age >= 18 end joe = { name: 'Joe', age: 19 } IsAdult[joe].valid? # => true IsAdult.not[joe].valid? # => false
@return [Assertion::Inverter]
# File lib/assertion/dsl/inversion.rb, line 28 def not Inverter.new(self) end
Also aliased as: !