25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00
xmpp.chapril.org-ejabberd/lib/ejabberd/config_util.ex
gabrielgatu 803270fc6b
Support for Elixir configuration file #1208
Contribution for Google Summer of code 2016 by Gabriel Gatu
2016-09-08 11:37:14 +02:00

19 lines
426 B
Elixir

defmodule Ejabberd.ConfigUtil do
@moduledoc """
Module containing utility functions for
the config file.
"""
@doc """
Returns true when the config file is based on elixir.
"""
@spec is_elixir_config(list) :: boolean
def is_elixir_config(filename) when is_list(filename) do
is_elixir_config(to_string(filename))
end
def is_elixir_config(filename) do
String.ends_with?(filename, "exs")
end
end