Thank you so much for ur reply. But the above code you have written will not work, if any block of statements are there within a function
def function if x > 2 puts "x is greater than 2" elsif x <= 2 and x!=0 puts "x is 1" else puts "I can't guess the number" end end
In the above case it will not work. So how to extract the entire function. Please explain me with solutions. Thanks in advance!
In reply to Re^2: Extracting the Methods in a Ruby file
by thillai_selvan
in thread Extracting the Methods in a Ruby file
by thillai_selvan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |