Sha256: a4b40fe14e5fe5c481432161dd265106e4e20f1b790fb28af184e79e42012afe
Contents?: true
Size: 690 Bytes
Versions: 6
Compression:
Stored size: 690 Bytes
Contents
# frozen_string_literal: true require "dry/container/stub" module Dry module System class Container # @api private module Stubs def finalize!(&block) super(freeze: false, &block) end end # Enables stubbing container's components # # @example # require 'dry/system/stubs' # # MyContainer.enable_stubs! # MyContainer.finalize! # # MyContainer.stub('some.component', some_stub_object) # # @return Container # # @api public def self.enable_stubs! super extend ::Dry::System::Container::Stubs self end end end end
Version data entries
6 entries across 6 versions & 1 rubygems