Skip to content

Instantly share code, notes, and snippets.

@guilleiguaran
Created May 27, 2015 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guilleiguaran/f8a4d992c538c996f2ed to your computer and use it in GitHub Desktop.
Save guilleiguaran/f8a4d992c538c996f2ed to your computer and use it in GitHub Desktop.
defmodule Bot do
@commands = %{"a" => :do_a, "b" => :do_b}
def match(command) do
execute(@commands[command])
end
def execute(:do_a) do
end
def execute(:do_b) do
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment