This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameter_hash.keys.select { |param_name| param_name.to_s =~ /\([0-9]i\)/ }.group_by { |param_name| param_name.match(/(.*)\([0-9]i\)/)[1] }.each do |base_name, full_names| | |
Used to change for me into: | |
param_names_ending_with_ni = parameter_hash.keys.select { |param_name| param_name.to_s =~ /\([0-9]i\)/ } | |
param_names_grouped_by_base_name = param_names_ending_with_ni.group_by { |param_name| param_name.match(/(.*)\([0-9]i\)/)[1] } | |
param_names_grouped_by_base_name.each do |base_name, full_names| | |
each loop that content that handles the base_name and full_names stuff I actually want to do something with :) | |
end |