7 lines
259 B
Elixir
7 lines
259 B
Elixir
|
defmodule PodcastFeed.Utility.Format do
|
||
|
|
||
|
def compile(subject, replacements) do
|
||
|
replacements
|
||
|
|> Enum.reduce(subject, fn {replacement_key, replacement_value}, subject -> String.replace(subject, "{#{replacement_key}}", replacement_value) end)
|
||
|
end
|
||
|
end
|