Class: Capybara::RSpecMatchers::Compound::CapybaraEvaluator
- Inherits:
-
Object
- Object
- Capybara::RSpecMatchers::Compound::CapybaraEvaluator
- Defined in:
- lib/capybara/rspec/compound.rb
Instance Method Summary collapse
-
#initialize(actual) ⇒ CapybaraEvaluator
constructor
A new instance of CapybaraEvaluator.
- #matcher_matches?(matcher) ⇒ Boolean
- #reset ⇒ Object
Constructor Details
#initialize(actual) ⇒ CapybaraEvaluator
Returns a new instance of CapybaraEvaluator.
21 22 23 24 |
# File 'lib/capybara/rspec/compound.rb', line 21 def initialize(actual) @actual = actual @match_results = Hash.new { |h, matcher| h[matcher] = matcher.matches?(@actual) } end |
Instance Method Details
#matcher_matches?(matcher) ⇒ Boolean
26 27 28 |
# File 'lib/capybara/rspec/compound.rb', line 26 def matcher_matches?(matcher) @match_results[matcher] end |
#reset ⇒ Object
30 31 32 |
# File 'lib/capybara/rspec/compound.rb', line 30 def reset @match_results.clear end |