Ruby prob with File.dirname(__FILE__) and class inherance
Posted
by Totty
on Stack Overflow
See other posts from Stack Overflow
or by Totty
Published on 2010-05-14T17:08:37Z
Indexed on
2010/05/14
17:24 UTC
Read the original article
Hit count: 250
ruby-on-rails
I have the parent class in /dir1/test1.rb then i have the child class in /dir2/test2.rb
the test1 class has a method that uses the "File.dirname(FILE)". BUT when i call this method from the test2, that inherent from test1 the dir is the dir1, insted the dir2, where the test2 is.
How to make it work?
© Stack Overflow or respective owner