Please consider the following snippet of code:
return ‘Hello, from the Parent class.’
class Child < Parent
return ‘Hello, from Child class.’
If I instantiate the Child class into my_greeting, then:
my_greeting.class.parent_greeting() => Hello, from the Parent class.
my_greeting.class.child_greeting() => Hello, from Child class.
My question is: What are these ‘class’ methods that show up in my
method calls to the object and in the get greeting method?
I have a hunch that the question is answered in the ‘Disambiguation’
section of http://www.jimmycuadra.com/posts/self-in-ruby; but, I wasn’t
able to understand it. Is the answer to my question something that I’m
going to be able to grasp; or, will I need to wait until my skills
Thanks for any input.