Class: RR::WildcardMatchers::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/rr/wildcard_matchers/boolean.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



9
10
11
# File 'lib/rr/wildcard_matchers/boolean.rb', line 9

def ==(other)
  other.is_a?(self.class)
end

#inspectObject



14
15
16
# File 'lib/rr/wildcard_matchers/boolean.rb', line 14

def inspect
  'boolean'
end

#wildcard_match?(other) ⇒ Boolean

Returns:



4
5
6
7
# File 'lib/rr/wildcard_matchers/boolean.rb', line 4

def wildcard_match?(other)
  self == other ||
  other.equal?(true) || other.equal?(false)
end