Skip to content

Instantly share code, notes, and snippets.

View malkomalko's full-sized avatar

Robert Malko malkomalko

  • Doximity
  • Atlanta, GA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am malkomalko on github.
  • I am malkomalko (https://keybase.io/malkomalko) on keybase.
  • I have a public key ASBeVeKk-zICqUV_hkY-fdw8Heb0668htuKPSNH9OPo0QAo

To claim this, I am signing this object:

@malkomalko
malkomalko / default_behaviour.ex
Created August 23, 2024 00:11 — forked from christhekeele/default_behaviour.ex
Behaviours with Defaults for Elixir
defmodule Default.Behaviour do
@moduledoc """
Creates a behaviour that carries its own default implementation.
When used into a behaviour module, when that module in turn is used, all functions
defined on it are given to the using module.
This allows you to have concrete implementations of the behaviour's default functionality
for testing, unlike cramming them all into a __using__ macro.