Closed palkan closed 1 year ago
Make it possible to convert a config instance to the ENV-like hash (which could be merged into ENV or dumped into a file or whatever).
ENV
Example:
class MyConfig < Anyway::Config env_prefix :myconf attr_config :host, :port, :user end MyConfig.new(host: "localhost", port: 8000, user: {name: "Jack"}).as_env #=> # { # "MYCONF_HOST" => "localhost", # "MYCONF_PORT" => "8000", # "MYCONF_USER__NAME => "Jack" # }
Based on the discussion: https://github.com/palkan/anyway_config/discussions/116
Added in #125. Released in v2.4.0
Is your feature request related to a problem? Please describe.
Make it possible to convert a config instance to the ENV-like hash (which could be merged into
ENV
or dumped into a file or whatever).Describe the solution you'd like
Example:
Additional context
Based on the discussion: https://github.com/palkan/anyway_config/discussions/116