Method: JsDuck::Util::IO.encoding=
- Defined in:
- lib/jsduck/util/io.rb
.encoding=(e) ⇒ Object
Sets the external encoding to be used for reading files. When it’s different from UTF-8, the input will be converted to UTF-8.
18 19 20 21 22 23 24 |
# File 'lib/jsduck/util/io.rb', line 18 def self.encoding=(e) if e =~ /^(BOM\|)?UTF-8$/i @@encoding = e else @@encoding = e+":UTF-8" end end |