Class: RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution Private
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb
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.
Instance Attribute Summary collapse
-
#indeterminate_actual_indexes ⇒ Object
Returns the value of attribute indeterminate_actual_indexes.
-
#indeterminate_expected_indexes ⇒ Object
Returns the value of attribute indeterminate_expected_indexes.
-
#unmatched_actual_indexes ⇒ Object
Returns the value of attribute unmatched_actual_indexes.
-
#unmatched_expected_indexes ⇒ Object
Returns the value of attribute unmatched_expected_indexes.
Instance Method Summary collapse
- #+(derived_candidate_solution) ⇒ Object private
- #candidate? ⇒ Boolean private
- #ideal? ⇒ Boolean private
- #unmatched_item_count ⇒ Object private
- #worse_than?(other) ⇒ Boolean private
Methods inherited from Struct
Instance Attribute Details
#indeterminate_actual_indexes ⇒ Object
Returns the value of attribute indeterminate_actual_indexes
188 189 190 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 188 def indeterminate_actual_indexes @indeterminate_actual_indexes end |
#indeterminate_expected_indexes ⇒ Object
Returns the value of attribute indeterminate_expected_indexes
188 189 190 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 188 def indeterminate_expected_indexes @indeterminate_expected_indexes end |
#unmatched_actual_indexes ⇒ Object
Returns the value of attribute unmatched_actual_indexes
188 189 190 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 188 def unmatched_actual_indexes @unmatched_actual_indexes end |
#unmatched_expected_indexes ⇒ Object
Returns the value of attribute unmatched_expected_indexes
188 189 190 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 188 def unmatched_expected_indexes @unmatched_expected_indexes end |
Instance Method Details
#+(derived_candidate_solution) ⇒ Object
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.
210 211 212 213 214 215 216 217 218 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 210 def +(derived_candidate_solution) self.class.new( unmatched_expected_indexes + derived_candidate_solution.unmatched_expected_indexes, unmatched_actual_indexes + derived_candidate_solution.unmatched_actual_indexes, # Ignore the indeterminate indexes: by the time we get here, # we've dealt with all indeterminates. [], [] ) end |
#candidate? ⇒ Boolean
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.
194 195 196 197 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 194 def candidate? indeterminate_expected_indexes.empty? && indeterminate_actual_indexes.empty? end |
#ideal? ⇒ Boolean
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.
199 200 201 202 203 204 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 199 def ideal? candidate? && ( unmatched_expected_indexes.empty? || unmatched_actual_indexes.empty? ) end |
#unmatched_item_count ⇒ Object
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.
206 207 208 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 206 def unmatched_item_count unmatched_expected_indexes.count + unmatched_actual_indexes.count end |
#worse_than?(other) ⇒ Boolean
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.
190 191 192 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/built_in/contain_exactly.rb', line 190 def worse_than?(other) unmatched_item_count > other.unmatched_item_count end |