How to include a method with __FILE__
$PROJECT_NAME/ex1.rb
module M
def m
"print __FILE__"
end
end
$PROJECT_NAME/ex2.rb
module M2
include M
def m2
eval m
end
end
include M2
m
I wanna m output "$PROJECT_NAME/ex2.rb", how should i do?
No comments:
Post a Comment