Assent v0.1.11 Assent.Config View Source

Methods to handle configurations.

Link to this section Summary

Link to this section Types

Link to this section Functions

Link to this function

fetch(config, key)

View Source
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.

Link to this function

json_library(config)

View Source
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.