Skip to content

Instantly share code, notes, and snippets.

@pragdave
Created June 12, 2013 03:45
Show Gist options
  • Save pragdave/5762691 to your computer and use it in GitHub Desktop.
Save pragdave/5762691 to your computer and use it in GitHub Desktop.
defmodule A do
def c(name) do
IO.puts "In c(#{name})"
end
end
wrapper = quote do
defmodule Wrapper do
def the_tests do
c("dddd")
end
end
end
A.c("normal")
Code.compiler_options(ignore_module_conflict: true)
Code.eval_quoted(wrapper, functions: [{A, [c: 1]}], delegate_locals_to: A)
Wrapper.the_tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment