Class: BooleanMatcher

Inherits:
Object show all
Defined in:
lib/core_extensions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance) ⇒ BooleanMatcher

Returns a new instance of BooleanMatcher.



54
55
56
# File 'lib/core_extensions.rb', line 54

def initialize(instance)
  @instance = instance
end

Instance Attribute Details

#instanceObject (readonly)

Returns the value of attribute instance.



53
54
55
# File 'lib/core_extensions.rb', line 53

def instance
  @instance
end

Instance Method Details

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



57
58
59
# File 'lib/core_extensions.rb', line 57

def ==(other)
  return (other.is_a?(TrueClass) || other.is_a?(FalseClass) || other.is_a?(BooleanMatcher))
end