Module: VCR::VariableArgsBlockCaller
- Included in:
- VCR, Configuration, Hooks, Hooks::FilteredHook, Middleware::Rack
- Defined in:
- lib/vcr/util/variable_args_block_caller.rb
Instance Method Summary collapse
Instance Method Details
#call_block(block, *args) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/vcr/util/variable_args_block_caller.rb', line 4 def call_block(block, *args) if block.arity >= 0 args = args.first([args.size, block.arity].min) end block.call(*args) end |