Class: RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
- Inherits:
-
Object
- Object
- RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
- Defined in:
- lib/rspec/support/method_signature_verifier.rb
Overview
If a matcher is used in a signature in place of keyword arguments, all keyword argument validation needs to be skipped since the matcher is opaque.
Instead, keyword arguments will be validated when the method is called and they are actually known.
Instance Method Summary collapse
- #has_kw_args_in?(args) ⇒ Boolean
-
#initialize(signature) ⇒ SignatureWithKeywordArgumentsMatcher
constructor
A new instance of SignatureWithKeywordArgumentsMatcher.
- #invalid_kw_args_from(_kw_args) ⇒ Object
- #missing_kw_args_from(_kw_args) ⇒ Object
- #non_kw_args_arity_description ⇒ Object
- #valid_non_kw_args?(*args) ⇒ Boolean
Constructor Details
#initialize(signature) ⇒ SignatureWithKeywordArgumentsMatcher
Returns a new instance of SignatureWithKeywordArgumentsMatcher.
441 442 443 |
# File 'lib/rspec/support/method_signature_verifier.rb', line 441 def initialize(signature) @signature = signature end |
Instance Method Details
#has_kw_args_in?(args) ⇒ Boolean
461 462 463 |
# File 'lib/rspec/support/method_signature_verifier.rb', line 461 def has_kw_args_in?(args) @signature.has_kw_args_in?(args) end |
#invalid_kw_args_from(_kw_args) ⇒ Object
449 450 451 |
# File 'lib/rspec/support/method_signature_verifier.rb', line 449 def invalid_kw_args_from(_kw_args) [] end |
#missing_kw_args_from(_kw_args) ⇒ Object
445 446 447 |
# File 'lib/rspec/support/method_signature_verifier.rb', line 445 def missing_kw_args_from(_kw_args) [] end |
#non_kw_args_arity_description ⇒ Object
453 454 455 |
# File 'lib/rspec/support/method_signature_verifier.rb', line 453 def non_kw_args_arity_description @signature.non_kw_args_arity_description end |
#valid_non_kw_args?(*args) ⇒ Boolean
457 458 459 |
# File 'lib/rspec/support/method_signature_verifier.rb', line 457 def valid_non_kw_args?(*args) @signature.valid_non_kw_args?(*args) end |