Class: Specifier::Expectation
- Inherits:
-
Object
- Object
- Specifier::Expectation
- Defined in:
- lib/specifier/expectation.rb
Overview
Defined Under Namespace
Classes: MatcherError
Instance Method Summary collapse
-
#initialize(value) ⇒ Expectation
constructor
A new instance of Expectation.
- #to(matcher) ⇒ Object
Constructor Details
#initialize(value) ⇒ Expectation
Returns a new instance of Expectation.
13 14 15 |
# File 'lib/specifier/expectation.rb', line 13 def initialize(value) @value = value end |
Instance Method Details
#to(matcher) ⇒ Object
17 18 19 |
# File 'lib/specifier/expectation.rb', line 17 def to(matcher) raise MatcherError, matcher. unless matcher.match?(@value) end |