Class: Spec::Mocks::BooleanArgConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/spec/mocks/argument_expectation.rb

Instance Method Summary collapse

Constructor Details

#initialize(ignore) ⇒ BooleanArgConstraint

Returns a new instance of BooleanArgConstraint.



54
55
# File 'lib/spec/mocks/argument_expectation.rb', line 54

def initialize(ignore)
end

Instance Method Details

#matches?(value) ⇒ Boolean

Returns:

  • (Boolean)


57
58
59
60
61
# File 'lib/spec/mocks/argument_expectation.rb', line 57

def matches?(value)
  return true if value.is_a?(TrueClass)
  return true if value.is_a?(FalseClass)
  false
end