I’m sure you have heard about the tap method. It has great uses for connecting to a chain of method calls; such as when using Enumerable. And the cool kids love to use it to avoid using a temp variable for return.

Another use is for code organization. The tap method addes a level of indention via it’s block parameter. This block gives a visual section of code that can be useful when trying to understand what is being written.

Something.new.tap do |something|
  # your code here
end

For me, when I’m scanning through code, these visual indention changes really help me understand the code.