def complement
      if @id.nil?
        @id = @file.gsub(%r{[\\/\. ]}, '-')
      end
      if @id =~ /\A[^a-z]/i
        @id = "rv-#{@id}"
      end

      if !@file.nil? && @media.nil?
        @media = @file.sub(/.+\./, '').downcase
      end

      case @media
      when 'xhtml', 'xml', 'html'
        @media = 'application/xhtml+xml'
      when 'css'
        @media = 'text/css'
      when 'jpg', 'jpeg', 'image/jpg'
        @media = 'image/jpeg'
      when 'png'
        @media = 'image/png'
      when 'gif'
        @media = 'image/gif'
      when 'svg', 'image/svg'
        @media = 'image/svg+xml'
      when 'ttf', 'otf'
        @media = 'application/vnd.ms-opentype'
      when 'woff'
        @media = 'application/font-woff'
      end

      if @id.nil? || @file.nil? || @media.nil?
        raise "Type error: #{id}, #{file}, #{media}, #{title}, #{notoc}"
      end
    end
def complement
      if @id.nil?
        @id = @file.gsub(%r{[\\/\. ]}, '-')
      end
      if @id =~ /\A[^a-z]/i
        @id = "rv-#{@id}"
      end

      if !@file.nil? && @media.nil?
        @media = @file.sub(/.+\./, '').downcase
      end

      case @media
      when 'xhtml', 'xml', 'html'
        @media = 'application/xhtml+xml'
      when 'css'
        @media = 'text/css'
      when 'jpg', 'jpeg', 'image/jpg'
        @media = 'image/jpeg'
      when 'png'
        @media = 'image/png'
      when 'gif'
        @media = 'image/gif'
      when 'svg', 'image/svg'
        @media = 'image/svg+xml'
      when 'ttf', 'otf'
        @media = 'application/vnd.ms-opentype'
      when 'woff'
        @media = 'application/font-woff'
      end

      if @id.nil? || @file.nil? || @media.nil?
        raise "Type error: #{id}, #{file}, #{media}, #{title}, #{notoc}"
      end
    end
Complement other parameters by using file parameter.