class EnvConfiguration
Ruby on Rails edge
Since edgeProvide a better interface for accessing configuration options stored in ENV. Keys are accepted as symbols and turned into upcased strings. Nesting is provided by double underscores.
This interface mirrors what is used for ActiveSupport::EncryptedConfiguration and thus allows both to serve as interchangeable backends for Rails.app.credentials.
Examples:
require(:db_host) # => ENV.fetch("DB_HOST")
require(:database, :host) # => ENV.fetch("DATABASE__HOST")
option(:database, :host) # => ENV["DATABASE__HOST"]
option(:debug, default: "true") # => ENV.fetch("DEBUG", "true")
option(:database, :host, default: -> { "missing" }) # => ENV.fetch("DATABASE__HOST") { "missing" }
Inherits from
Methods (defined here)
Private methods (1)
Show private methods Implementation detail — not part of the public API.
- # envify
Methods (inherited)
From Object
(17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # with
- # with_options
From ActiveSupport::NumericWithFormat
(2)
- # to_formatted_s
- # to_fs