Create method && block for ruby