Top Level Namespace

Defined Under Namespace

Classes: CLI, FileCharsetValidator

Instance Method Summary collapse

Instance Method Details

#get_encoding(encoding_string) ⇒ Object



1
2
3
4
5
6
7
# File 'lib/file_charset_validator/helper.rb', line 1

def get_encoding(encoding_string)
  if Encoding.const_defined? encoding_string
    Object.const_get("Encoding::#{encoding_string}")
  else
    nil
  end
end