Sha256: 88de61c95cb6c60b37c882434c7cca7ebbfae3a62f105216ba28f7b3e6383c6a
Contents?: true
Size: 699 Bytes
Versions: 1
Compression:
Stored size: 699 Bytes
Contents
# typed: strict module Mocktail class MatcherPresentation extend T::Sig sig { params(name: Symbol, include_private: T::Boolean).returns(T::Boolean) } def respond_to_missing?(name, include_private = false) !!MatcherRegistry.instance.get(name) || super end sig { params(name: Symbol, args: T.anything, kwargs: T.anything, blk: T.nilable(Proc)).returns(T.anything) } def method_missing(name, *args, **kwargs, &blk) # standard:disable Style/ArgumentsForwarding if (matcher = MatcherRegistry.instance.get(name)) T.unsafe(matcher).new(*args, **kwargs, &blk) # standard:disable Style/ArgumentsForwarding else super end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mocktail-2.0.0 | lib/mocktail/sorbet/mocktail/matcher_presentation.rb |