class RSpec::Matchers::BuiltIn::DynamicPredicate
@api private Provides the implementation for dynamic predicate matchers. Not intended to be inherited directly.
Public Class Methods
# File rspec-expectations/lib/rspec/matchers/built_in/has.rb, line 12 def initialize(method_name, *args, &block) @method_name, @args, @block = method_name, args, block end
Public Instance Methods
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/has.rb, line 45 def description "#{method_description}#{args_to_sentence}" end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/has.rb, line 25 def does_not_match?(actual, &block) @actual = actual @block ||= block predicate_accessible? && predicate_matches?(false) end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/has.rb, line 33 def failure_message failure_message_expecting(true) end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/has.rb, line 39 def failure_message_when_negated failure_message_expecting(false) end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/has.rb, line 18 def matches?(actual, &block) @actual = actual @block ||= block predicate_accessible? && predicate_matches? end