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.
22 23 24 25 |
# File 'lib/capybara/rspec/compound.rb', line 22 def initialize(actual) @actual = actual @match_results = Hash.new { |hsh, matcher| hsh[matcher] = matcher.matches?(@actual) } end |
Instance Method Details
#matcher_matches?(matcher) ⇒ Boolean
27 28 29 |
# File 'lib/capybara/rspec/compound.rb', line 27 def matcher_matches?(matcher) @match_results[matcher] end |
#reset ⇒ Object
31 32 33 |
# File 'lib/capybara/rspec/compound.rb', line 31 def reset @match_results.clear end |