Class: Spec::Mocks::BooleanArgConstraint
- Defined in:
- lib/spec/mocks/argument_expectation.rb
Instance Method Summary collapse
- #==(value) ⇒ Object
-
#initialize(ignore) ⇒ BooleanArgConstraint
constructor
A new instance of BooleanArgConstraint.
- #matches?(value) ⇒ Boolean
Constructor Details
#initialize(ignore) ⇒ BooleanArgConstraint
Returns a new instance of BooleanArgConstraint.
75 76 |
# File 'lib/spec/mocks/argument_expectation.rb', line 75 def initialize(ignore) end |
Instance Method Details
#==(value) ⇒ Object
78 79 80 |
# File 'lib/spec/mocks/argument_expectation.rb', line 78 def ==(value) matches?(value) end |
#matches?(value) ⇒ Boolean
82 83 84 85 86 |
# File 'lib/spec/mocks/argument_expectation.rb', line 82 def matches?(value) return true if value.is_a?(TrueClass) return true if value.is_a?(FalseClass) false end |