123456789_123456789_123456789_123456789_123456789_

Class: Capybara::RSpecMatchers::Matchers::Compound::CapybaraEvaluator

Relationships & Source Files
Inherits: Object
Defined in: lib/capybara/rspec/matchers/compound.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(actual) ⇒ CapybaraEvaluator

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/compound.rb', line 23

def initialize(actual)
  @actual = actual
  @match_results = Hash.new { |hsh, matcher| hsh[matcher] = matcher.matches?(@actual) }
end

Instance Method Details

#matcher_matches?(matcher) ⇒ Boolean

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/compound.rb', line 28

def matcher_matches?(matcher)
  @match_results[matcher]
end

#reset

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/compound.rb', line 32

def reset
  @match_results.clear
end