Is there a simple way of getting the struct name without the “Elixir.” prefix?
Edit: This is the best solution I have found, can anyone see an issue with it or provide a more succinct version?
Kernel.inspect(my_struct.__struct__)
Thanks!
Is there a simple way of getting the struct name without the “Elixir.” prefix?
Edit: This is the best solution I have found, can anyone see an issue with it or provide a more succinct version?
Kernel.inspect(my_struct.__struct__)
Thanks!
It’s ok.
What do you need this for? This will return a string, is this really what you want?
It’s so I can return the schema name to my client, along with the payload that conforms to it. Yes, a string is what I want.