Ruby: Some examples of yielding to create a custom each method