Good day.
Now I'm creating questions for Ruby education course. I divide them in 3 stages "simple","normal", "advanced". I know if define one method within another in Ruby it will acts as like as I defined 2 method. But I do not know how to explain this behavior.
def one
p "one"
def two
p "two"
end
end
one # "one"
two # "two"
Please help me with explanation what's going on? I going to put this question in "advanced" part.
Thank you.
UPD: educations course - list of questions with variants of answers I had during my way in Ruby. I'm relatively new in Ruby, and I preserve list of questions I been confused, and list of questions I been surprised.