Skip to content

altecode/exSignals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9d3b8c7 · Mar 17, 2020

History

2 Commits
Mar 17, 2020
Mar 17, 2020
Mar 17, 2020
Mar 17, 2020
Mar 17, 2020
Mar 17, 2020

Repository files navigation

ExSignal

Django like signals implementation in elixir

Installation

If available in Hex, the package can be installed by adding ex_signal to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_signal, "~> 0.1.0"}
  ]
end
  defmodule SignalsDemo do
    # The result of any function decorated as a signal
    # is sent to the receivers of the named signal
    @signal("some_signal_name")
    def foo() do
      :foo
    end

    # Receiever is any arity 1 function
    # Gets called with the result of the sender
    @receiver("some_signal_name")
    def bar(foo) do
      IO.inspect("Recieved #{foo}")
    end
  end

About

Python Django signals implementation in elixir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages