Class: RSpec::Support::MethodSignatureExpectation Private
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb
Overview
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.
Encapsulates expectations about the number of arguments and allowed/required keyword args of a given method.
Instance Attribute Summary collapse
- #expect_arbitrary_keywords ⇒ Object private
- #expect_unlimited_arguments ⇒ Object private
- #keywords ⇒ Object private
- #max_count ⇒ Object private
- #min_count ⇒ Object private
Instance Method Summary collapse
- #empty? ⇒ Boolean private
-
#initialize ⇒ MethodSignatureExpectation
constructor
private
A new instance of MethodSignatureExpectation.
Constructor Details
#initialize ⇒ MethodSignatureExpectation
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.
Returns a new instance of MethodSignatureExpectation.
218 219 220 221 222 223 224 225 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb', line 218 def initialize @min_count = nil @max_count = nil @keywords = [] @expect_unlimited_arguments = false @expect_arbitrary_keywords = false end |
Instance Attribute Details
#expect_arbitrary_keywords ⇒ 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.
229 230 231 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb', line 229 def expect_arbitrary_keywords @expect_arbitrary_keywords end |
#expect_unlimited_arguments ⇒ 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.
229 230 231 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb', line 229 def expect_unlimited_arguments @expect_unlimited_arguments end |
#keywords ⇒ 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.
227 228 229 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb', line 227 def keywords @keywords end |
#max_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.
227 228 229 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb', line 227 def max_count @max_count end |
#min_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.
227 228 229 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb', line 227 def min_count @min_count end |
Instance Method Details
#empty? ⇒ 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.
245 246 247 248 249 250 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb', line 245 def empty? @min_count.nil? && @keywords.to_a.empty? && !@expect_arbitrary_keywords && !@expect_unlimited_arguments end |