ConfigSmuggler.encode_statement
You're seeing just the function
encode_statement
, go back to ConfigSmuggler module for more information.
Specs
encode_statement(String.t()) :: {:ok, encoded_config_map()} | {:error, error_reason()}
Encodes a single Mix.Config.config/2
or Mix.Config.config/3
statement into one or more encoded key/value pairs.
iex> ConfigSmuggler.encode_statement("config :my_app, key1: :value1, key2: \"value2\"")
{:ok, %{
"elixir-my_app-key1" => ":value1",
"elixir-my_app-key2" => "\"value2\"",
}}
iex> ConfigSmuggler.encode_statement("config :my_app, MyApp.Endpoint, url: [host: \"localhost\", port: 4444]")
{:ok, %{
"elixir-my_app-MyApp.Endpoint-url-host" => "\"localhost\"",
"elixir-my_app-MyApp.Endpoint-url-port" => "4444",
}}