naming
This commit is contained in:
parent
e1603ac8fe
commit
32c6576b60
|
@ -331,7 +331,7 @@ def string_to_elixir_types("~r" <> _pattern = regex) do
|
||||||
def string_to_elixir_types(":" <> atom), do: String.to_atom(atom)
|
def string_to_elixir_types(":" <> atom), do: String.to_atom(atom)
|
||||||
|
|
||||||
def string_to_elixir_types(value) do
|
def string_to_elixir_types(value) do
|
||||||
if is_module_name?(value) do
|
if module_name?(value) do
|
||||||
String.to_existing_atom("Elixir." <> value)
|
String.to_existing_atom("Elixir." <> value)
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
|
@ -373,8 +373,8 @@ defp find_valid_delimiter([delimiter | others], pattern, regex_delimiter) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec is_module_name?(String.t()) :: boolean()
|
@spec module_name?(String.t()) :: boolean()
|
||||||
def is_module_name?(string) do
|
def module_name?(string) do
|
||||||
Regex.match?(~r/^(Pleroma|Phoenix|Tesla|Quack|Ueberauth|Swoosh)\./, string) or
|
Regex.match?(~r/^(Pleroma|Phoenix|Tesla|Quack|Ueberauth|Swoosh)\./, string) or
|
||||||
string in ["Oban", "Ueberauth", "ExSyslogger"]
|
string in ["Oban", "Ueberauth", "ExSyslogger"]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue