How to make cleaner such code:
def some_public_method(arg)
var1 = private_method(arg)
var2 = private_method1(var1) if var1
var3 = private_method2(var2) if var2
var4 = private_method3(var3) if var3
private_method4(var4) if var4
end
UPDATE: sorry, forgot to change method names
This is one way you could do it.
Code
Examples