Class: Spec::Mocks::LiteralArgConstraint
- Defined in:
- lib/spec/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.
15 16 17 |
# File 'lib/spec/mocks/argument_expectation.rb', line 15 def initialize(literal) @literal_value = literal end |
Instance Method Details
#matches?(value) ⇒ Boolean
19 20 21 |
# File 'lib/spec/mocks/argument_expectation.rb', line 19 def matches?(value) @literal_value == value end |