Packages

A plugin for Hedwig that will make your eyes roll

Current section

Files

Jump to
hedwig_dad_joke lib hedwig_dad_joke config.ex
Raw

lib/hedwig_dad_joke/config.ex

defmodule HedwigDadJoke.Config do
@moduledoc """
The home of the default configuration of HedwigDadJoke.
"""
defstruct user_agent: "https://github.com/maxbeizer/hedwig_dad_joke",
sources: [HedwigDadJoke.Icanhazdadjoke, HedwigDadJoke.WesBosDadJokes],
format: :plain
@type t :: %__MODULE__{user_agent: String.t(), sources: [module()], format: atom()}
@doc """
Merge the pased in configuration with the defaults to create the Config
struct.
"""
@spec new(map()) :: t()
def new(passed_in \\ %{}) do
struct(__MODULE__, passed_in)
end
end