Class: Anyway::Loaders::Env
Instance Method Summary collapse
Methods inherited from Base
call, #initialize, #use_local?
Methods included from Tracing
capture, current_trace, current_trace_source, #inspect, source_stack, trace!, trace_stack, with_trace_source
Constructor Details
This class inherits a constructor from Anyway::Loaders::Base
Instance Method Details
#call(env_prefix:, **_options) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/anyway/loaders/env.rb', line 6 def call(env_prefix:, **) env = ::Anyway::Env.new(type_cast: ::Anyway::NoCast) env.fetch_with_trace(env_prefix).then do |(conf, trace)| Tracing.current_trace&.merge!(trace) conf end end |