def build_candidates(candidates)
      candidates.to_a.map do |object, preferences|
        candidate(object).tap do |c|
          c.prefer(*preferences.map { |t| target(t) })
        end
      end
    end
def build_candidates(candidates)
      candidates.to_a.map do |object, preferences|
        candidate(object).tap do |c|
          c.prefer(*preferences.map { |t| target(t) })
        end
      end
    end
Builds a list of candidates for the +MatchMaker+.
 The parameter is a hash of unwrapped canditate objects to their preferred
 targets.

 @example
   matchbook.build_candidates(
     'Harry'    => ['Gryffindor', 'Slytherin'],
     'Hermione' => ['Ravenclaw', 'Gryffindor'],
     'Ron'      => ['Gryffindor'],
     'Neville'  => ['Hufflepuff', 'Gryffindor', 'Ravenclaw', 'Slytherin']
   )

 @param candidates [Hash<Object, Array<Object>>]
   Hash of candidate objects to a list of their preferred targets