A
Alexander Trauzzi
Hello all,
I'm getting somewhat confused by the use of "self" when doing Ruby
programming.
Self in other languages has typically referred to a currently executing
class, while "this" is used for the current instance.
How does it work in Ruby, given that I've seen self used to describe
static methods AND refer to the current instance?
Moreover, how do I get the furthest-down-the-inheritance-chain name of
the currently running instance?
Are there any good tutorials with examples on how to do reflection along
these lines in Ruby?
Thanks for any help!
I'm getting somewhat confused by the use of "self" when doing Ruby
programming.
Self in other languages has typically referred to a currently executing
class, while "this" is used for the current instance.
How does it work in Ruby, given that I've seen self used to describe
static methods AND refer to the current instance?
Moreover, how do I get the furthest-down-the-inheritance-chain name of
the currently running instance?
Are there any good tutorials with examples on how to do reflection along
these lines in Ruby?
Thanks for any help!