method

parse

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Secrets
parse(paths, env:) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/secrets.rb, line 25
      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
Register or log in to add new notes.