spec/sudoku_spec.rb
# Creates an array that shows which of the given groups each identifier belongs
# to.
# @param groups [Array<Array<Identifier>>] An array of arrays of identifiers
# @return [Array<Fixnum>] an array of the indices if the identifiers in the given
#                         groups.
Creates an array that shows which of the given groups each identifier belongs
to.
Creates an array that shows which of the given groups each identifier belongs to .
def identifier_indices_in(groups)
      sudoku.identifiers.collect{|identifier|
        groups.index{|group| group.include?(identifier) }
      }
    end
def identifier_indices_in ( groups ) sudoku . identifiers . collect { | identifier | groups . index { | group | group . include? ( identifier ) } } end
Creates an array that shows which of the given groups each identifier belongs
to.
Creates an array that shows which of the given groups each identifier belongs to .
an array of the indices if the identifiers in the given groups.
an array of the indices if the identifiers in the given groups .
Array<Fixnum>
groups
An array of arrays of identifiers
An array of arrays of identifiers