module Dry module System module Plugins # @api public class Env < Module DEFAULT_INFERRER = -> { :development } attr_reader :options # @api private def initialize(options) @options = options end def inferrer options.fetch(:inferrer, DEFAULT_INFERRER) end # @api private def extended(system) system.setting :env, inferrer.(), reader: true super end end end end end