class Algebrick::Matchers::Not

Attributes

matcher[R]

Public Class Methods

new(matcher) click to toggle source
# File lib/algebrick/matchers/not.rb, line 20
def initialize(matcher)
  @matcher = matcher
end

Public Instance Methods

==(other) click to toggle source
# File lib/algebrick/matchers/not.rb, line 32
def ==(other)
  other.kind_of? self.class and
      self.matcher == other.matcher
end
children() click to toggle source
# File lib/algebrick/matchers/not.rb, line 24
def children
  []
end
to_s() click to toggle source
# File lib/algebrick/matchers/not.rb, line 28
def to_s
  '!' + matcher.to_s
end

Protected Instance Methods

matching?(other) click to toggle source
# File lib/algebrick/matchers/not.rb, line 39
def matching?(other)
  not matcher === other
end