Sha256: c8a2ea79f77491d9d1e7d32c842eafa4b2b6b2dca725f1651b9b641a2c530960
Contents?: true
Size: 610 Bytes
Versions: 2
Compression:
Stored size: 610 Bytes
Contents
# frozen_string_literal: true require "dry/configurable/errors" module Dry module Configurable # Common API for both classes and instances # # @api public module Methods # @api public def configure(&block) raise FrozenConfig, "Cannot modify frozen config" if frozen? yield(config) if block self end # Finalize and freeze configuration # # @return [Dry::Configurable::Config] # # @api public def finalize! return self if config.frozen? config.finalize! self end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dry-configurable-0.14.0 | lib/dry/configurable/methods.rb |
dry-configurable-0.13.0 | lib/dry/configurable/methods.rb |