Assent.Config (Assent v0.1.27) View Source

Methods to handle configurations.

Link to this section Summary

Link to this section Types

Link to this section Functions

Specs

fetch(t(), atom()) ::
  {:ok, any()}
  | {:error,
     %Assent.Config.MissingKeyError{__exception__: term(), message: term()}}

Fetches the key value from the configuration.

Link to this function

get(config, key, default)

View Source

See Keyword.get/3.

Specs

json_library(t()) :: module()

Fetches the JSON library in config.

If not found in provided config, this will attempt to load the JSON library from global application environment for :assent or :phoenix. Defaults to Poison.

Link to this function

merge(config_a, config_b)

View Source

See Keyword.merge/2.

See Keyword.put/3.