N
Nicolaj Soendberg Madsen
How do I access an outer variable from within a nested class?
Is it possible to directly access them?
Is it possible to directly access them?
How do I access an outer variable from within a nested class?
Is it possible to directly access them?
jib:~ > cat a.rb
class Outer
CONST = 42
p CONST
class Inner
CONST = 42.0
I am not sure what you wanted to know from your question.
Are you asking
How a variable of super class can be accessed from its sub-class?
Thanks
Mohammad
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.