class RSpec::Matchers::BuiltIn::BePredicate
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/rspec/matchers/built_in/has.rbs class RSpec::Matchers::BuiltIn::BePredicate < RSpec::Matchers::BuiltIn::DynamicPredicate def predicate_accessible?: () -> true def predicate_method_name: () -> Symbol end
Not intended to be instantiated directly.
Provides the implementation of ‘be_<predicate>`.
@api private
def failure_to_respond_explanation
def failure_to_respond_explanation super || if predicate == :true? " or perhaps you meant `be true` or `be_truthy`" elsif predicate == :false? " or perhaps you meant `be false` or `be_falsey`" end end
def predicate
def predicate @predicate ||= :"#{root}?" end
def predicate_accessible?
Experimental RBS support (using type sampling data from the type_fusion
project).
def predicate_accessible?: () -> true
This signature was generated using 5 samples from 1 application.
def predicate_accessible? super || actual.respond_to?(present_tense_predicate) end
def predicate_method_name
Experimental RBS support (using type sampling data from the type_fusion
project).
def predicate_method_name: () -> Symbol
This signature was generated using 2 samples from 1 application.
def predicate_method_name actual.respond_to?(predicate) ? predicate : present_tense_predicate end
def present_tense_predicate
def present_tense_predicate :"#{root}s?" end