Refactor @num_range.each into a single-line block