Mixeur
Mixin for Elixir
What it does?
It allows you to do mixin like in Ruby. For example:
I have an apple:
defmodule Apple do
use Mixeur
def apple do
"Apple"
end
endI have a pen:
defmodule Pen do
use Mixeur
def pen do
"Pen"
end
endOh Oh Oh ApplePen:
defmodule ApplePen do
use Apple
use Pen
def apple_pen do
"#{apple()}#{pen()}"
end
endInstallation
If available in Hex, the package can be installed
by adding mixeur to your list of dependencies in mix.exs:
def deps do
[
{:mixeur, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/mixeur.