Class: Specifier::Expectation
- Inherits:
-
Object
- Object
- Specifier::Expectation
- Defined in:
- lib/specifier/expectation.rb
Overview
Defined Under Namespace
Classes: Miss
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.
17 18 19 |
# File 'lib/specifier/expectation.rb', line 17 def initialize(value) @value = value end |
Instance Method Details
#to(matcher) ⇒ Object
21 22 23 |
# File 'lib/specifier/expectation.rb', line 21 def to(matcher) raise Miss, matcher. unless matcher.match?(@value) end |