-
-
Save styx/6690138 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ls | |
other_thing.exs | |
thing.exs | |
$ elixir thing.exs | |
calling other | |
other thing! | |
hooray! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule OtherThing do | |
def other do | |
IO.puts "other thing!" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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