Class: RSpec::Matchers::BuiltIn::All Private
- Inherits:
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::All
- Defined in:
- lib/rspec/matchers/built_in/all.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Provides the implementation for all.
Not intended to be instantiated directly.
Constant Summary
Constants inherited from BaseMatcher
Instance Method Summary collapse
- #description ⇒ String private
- #failure_message ⇒ String private
-
#initialize(matcher) ⇒ All
constructor
private
A new instance of All.
Methods inherited from BaseMatcher
#diffable?, #failure_message_when_negated, #match_unless_raises, #matches?, #supports_block_expectations?
Methods included from Composable
#===, #and, #description_of, enumerable?, #or, surface_descriptions_in, #values_match?
Methods included from Pretty
#name, split_words, #to_sentence, #to_word
Constructor Details
#initialize(matcher) ⇒ All
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of All.
12 13 14 15 |
# File 'lib/rspec/matchers/built_in/all.rb', line 12 def initialize(matcher) @matcher = matcher @failed_objects = {} end |
Instance Method Details
#description ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 |
# File 'lib/rspec/matchers/built_in/all.rb', line 34 def description described_items = surface_descriptions_in(matcher) improve_hash_formatting "all#{to_sentence(described_items)}" end |
#failure_message ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 27 28 29 30 |
# File 'lib/rspec/matchers/built_in/all.rb', line 24 def = [improve_hash_formatting(super)] failed_objects.each do |index, | << (index, ) end .join("\n\n") end |