Class: Spec::Api::BooleanArgConstraint

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

Instance Method Summary collapse

Constructor Details

#initialize(ignore) ⇒ BooleanArgConstraint

Returns a new instance of BooleanArgConstraint.



33
34
# File 'lib/spec/api/mocks/argument_expectation.rb', line 33

def initialize(ignore)
end

Instance Method Details

#matches?(value) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
39
40
# File 'lib/spec/api/mocks/argument_expectation.rb', line 36

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