How to get the full file path of an arbitrary ruby class?
- by Travis
eg:
class Base
def self.inherited(subclass)
puts "New subclass: #{subclass}"
path_of_subclass = ????
end
end
Then in another file/class, it extends Base.
class X < Base
....
end
How would I get the path to the rb file of that subclass from the super class.