Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 953 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 953 Bytes

MaxoMacro

Hex.pm Docs CI

MaxoMacro provides useful macros to simplify your code.

Usage

MaxoMacro.import_with_delegates generates public delegates for all functions on the source module.

defmodule Source do
  def hey(name), do: "Hey, #{name}!"
end

defmodule Target do
  require MaxoMacro
  MaxoMacro.import_with_delegates(Source)
end
Target.hey("Joe")
# => Hey, Joe!

Installation

The package can be installed by adding maxo_macro to your list of dependencies in mix.exs:

def deps do
  [
    {:maxo_macro, "~> 0.1"}
  ]
end

The docs can be found at https://hexdocs.pm/maxo_macro.