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
end

I have a pen:

defmodule Pen do
  use Mixeur

  def pen do
    "Pen"
  end
end

Oh Oh Oh ApplePen:

defmodule ApplePen do
    use Apple
    use Pen

    def apple_pen do
      "#{apple()}#{pen()}"
    end
end

Installation

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"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/mixeur.