Skip to content

Instantly share code, notes, and snippets.

@styx
Forked from catsby/_output
Created September 24, 2013 19:38
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 styx/6690138 to your computer and use it in GitHub Desktop.
Save styx/6690138 to your computer and use it in GitHub Desktop.
$ ls
other_thing.exs
thing.exs
$ elixir thing.exs
calling other
other thing!
hooray!
defmodule OtherThing do
def other do
IO.puts "other thing!"
end
end
defmodule Thing do
Code.require_file "other_thing.exs", __DIR__
def do_something do
IO.puts "calling other"
OtherThing.other()
IO.puts "hooray!"
end
end
Thing.do_something()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment