Sha256: a250025e899627691875ef344b0947eaf818da8e789523a7eadc5ea56bcfa8a0
Contents?: true
Size: 704 Bytes
Versions: 10
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true require "dry/container/stub" module Dry module System class Container # @api private module Stubs def finalize!(freeze: true, &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
10 entries across 10 versions & 1 rubygems