def parse_xibs
      Dir["#{options.source_dir}/**/*.{storyboard,xib}"].each_with_index do |xib, xib_index|

        filename = File.basename(xib, '.*')

        next if options.ignored.include? filename
        
        xibs << filename

        group_name = "#{xib.split(".").last}Names"

        constants[filename] << Location.new(group_name, nil, xib, filename, xib_index + 1)

        File.readlines(xib, encoding: 'UTF-8').each_with_index do |line, index|
          options.queries.each do |query|
            next unless value = line[query.regex, 1]
            next if value.strip.empty?
            next unless value.start_with?(options.prefix) if options.prefix

            constants[value] << Location.new(query.node, query.attribute, line.strip, filename, index + 1)
          end
        end
      end
    end
def parse_xibs
      Dir["#{options.source_dir}/**/*.{storyboard,xib}"].each_with_index do |xib, xib_index|

        filename = File.basename(xib, '.*')

        next if options.ignored.include? filename
        
        xibs << filename

        group_name = "#{xib.split(".").last}Names"

        constants[filename] << Location.new(group_name, nil, xib, filename, xib_index + 1)

        File.readlines(xib, encoding: 'UTF-8').each_with_index do |line, index|
          options.queries.each do |query|
            next unless value = line[query.regex, 1]
            next if value.strip.empty?
            next unless value.start_with?(options.prefix) if options.prefix

            constants[value] << Location.new(query.node, query.attribute, line.strip, filename, index + 1)
          end
        end
      end
    end
Parse all found storyboards and build a dictionary of constant => locations

 A constant key can potentially exist in many files so locations is a collection