S
Sunil Chikkegowda
Hello All,
Take a look at this example:
def method1
puts 'hello'
def method2
puts 'world'
end
end
In IRB, if I say 'method1' it gives 'hello' as output. For
'method1.method2' it gives 'hello' in first line and 'world' in second
line.
My question is: Is there any way to print only 'world' if I execute
method1.method2
Take a look at this example:
def method1
puts 'hello'
def method2
puts 'world'
end
end
In IRB, if I say 'method1' it gives 'hello' as output. For
'method1.method2' it gives 'hello' in first line and 'world' in second
line.
My question is: Is there any way to print only 'world' if I execute
method1.method2