Class: Leftovers::Matchers::Not

Inherits:
Object
  • Object
show all
Includes:
ComparableInstance
Defined in:
lib/leftovers/matchers/not.rb

Instance Method Summary collapse

Methods included from ComparableInstance

#eql?, #hash

Constructor Details

#initialize(matcher) ⇒ Not

Returns a new instance of Not.



8
9
10
11
12
# File 'lib/leftovers/matchers/not.rb', line 8

def initialize(matcher)
  @matcher = matcher

  freeze
end

Instance Method Details

#===(value) ⇒ Object



14
15
16
# File 'lib/leftovers/matchers/not.rb', line 14

def ===(value)
  !(@matcher === value)
end