method

detect_encoding

ruby latest stable - Class: RDoc::Encoding

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

detect_encoding(string)
public

Detects the encoding of string based on the magic comment