open-pod/lib/podcast_feed/Utility/Format.ex
danilo silva 6b042f65ab using json instaed of xml
removed hardcoded from generic podcast medatadata
2020-05-23 21:51:56 +00:00

7 lines
No EOL
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