Class: Spec::Api::LiteralArgConstraint
- Defined in:
- lib/spec/api/mocks/argument_expectation.rb
Instance Method Summary collapse
-
#initialize(literal) ⇒ LiteralArgConstraint
constructor
A new instance of LiteralArgConstraint.
- #matches?(value) ⇒ Boolean
Constructor Details
#initialize(literal) ⇒ LiteralArgConstraint
Returns a new instance of LiteralArgConstraint.
5 6 7 |
# File 'lib/spec/api/mocks/argument_expectation.rb', line 5 def initialize(literal) @literal_value = literal end |
Instance Method Details
#matches?(value) ⇒ Boolean
9 10 11 |
# File 'lib/spec/api/mocks/argument_expectation.rb', line 9 def matches?(value) @literal_value == value end |