Skip to content

Instantly share code, notes, and snippets.

@0xGGGGG
Created July 3, 2012 21:53
Show Gist options
  • Save 0xGGGGG/3043587 to your computer and use it in GitHub Desktop.
Save 0xGGGGG/3043587 to your computer and use it in GitHub Desktop.
implementing a custom behavior you want
-module(my_behaviour).
-export([behaviour_info/1]).
%% init/1, some_fun/0 and other/3 are now expected callbacks
behaviour_info(callbacks) -> [{init,1}, {some_fun, 0}, {other, 3}];
behaviour_info(_) -> undefined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment