Class: RSpec::Support::BlockSignature

### Home Classes Methods

### In Files

- lib/rspec/support/method_signature_verifier.rb

### Parent

RSpec::Support::MethodSignature

### Methods

- #classify_parameters

### Class/Module Index

Quicksearch

- RSpec
- RSpec::CallerFilter
- RSpec::Support
- RSpec::Support::BlockSignature
- RSpec::Support::Differ
- RSpec::Support::DirectoryMaker
- RSpec::Support::EncodedString
- RSpec::Support::FormattingSupport
- RSpec::Support::FuzzyMatcher
- RSpec::Support::HunkGenerator
- RSpec::Support::InSubProcess
- RSpec::Support::LooseSignatureVerifier
- RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
- RSpec::Support::MethodSignature
- RSpec::Support::MethodSignatureVerifier
- RSpec::Support::OS
- RSpec::Support::RecursiveConstMethods
- RSpec::Support::Ruby
- RSpec::Support::RubyFeatures
- RSpec::Support::ShellOut
- RSpec::Support::Spec
- RSpec::Support::StdErrSplitter
- RSpec::Support::StrictSignatureVerifier
- RSpec::Support::Version
- RSpec::Support::VersionChecker
- RSpec::Support::Warnings
- RSpec::Support::WarningsPrevention
- RSpec::Support::WithIsolatedStdErr
- Object
- RSpecHelpers

No matching classes.

# RSpec::Support::BlockSignature

Deals with the slightly different semantics of block arguments. For methods, arguments are required unless a default value is provided. For blocks, arguments are optional, even if no default value is provided.

However, we want to treat block args as required since you virtually always want to pass a value for each received argument and our `and_yield` has treated block args as required for many years.

@api private

### Public Instance Methods

classify_parameters() click to toggle source

    # File lib/rspec/support/method_signature_verifier.rb, line 150
    def classify_parameters
      super
      @min_non_kw_args = @max_non_kw_args unless @max_non_kw_args == INFINITY
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.