Is there a way for me to do that on ruby ?
class Foo
def self.class_name
end
end
class Bar < Foo
end
class Tar < Foo
end
Bar.class_name
= 'Bar'
Tar.class_name
= 'Tar'
I want to get the class name of the class who called the instance method from the parent class.
I tried the code above and it keeps getting me 'Class' as the result.
Is that possible in ruby ?
[]`s
===================
Alexandre Mondaini Calvão
"Nossa recompensa se encontra no esforço e não no resultado. Um esforço total é uma vitória completa." [Ghandi]