class Rails::Secrets

def parse(paths, env:)

Experimental RBS support (using type sampling data from the type_fusion project).

def parse: (Array[] paths, env: ActiveSupport::EnvironmentInquirer) -> untyped

This signature was generated using 1 sample from 1 application.

def parse(paths, env:)
  paths.each_with_object(Hash.new) do |path, all_secrets|
    require "erb"
    source = ERB.new(preprocess(path)).result
    secrets = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(source) : YAML.load(source)
    secrets ||= {}
    all_secrets.merge!(secrets["shared"].deep_symbolize_keys) if secrets["shared"]
    all_secrets.merge!(secrets[env].deep_symbolize_keys) if secrets[env]
  end
end