def target(name)
      target = targets.select {|t| t.name == name.to_s}.first
      raise "No such target #{name}, available targets are #{targets.map {|t| t.name}.join(', ')}" if target.nil?
      yield target if block_given?
      target
    end
def target(name)
      target = targets.select {|t| t.name == name.to_s}.first
      raise "No such target #{name}, available targets are #{targets.map {|t| t.name}.join(', ')}" if target.nil?
      yield target if block_given?
      target
    end
Return the target with the specified name. Raises an error if no targets
 match the specified name.

 @note if two targets match names, the first matching target is returned.

 @param [String] name of the specific target
 @return [Target] the specific target that matches the name specified