Module: REXML::Encoding
Instance Attribute Summary collapse
-
#encoding ⇒ Object
ID —> Encoding name.
Instance Method Summary collapse
Instance Attribute Details
#encoding ⇒ Object
ID —> Encoding name
6 7 8 |
# File 'lib/rexml/encoding.rb', line 6 def encoding @encoding end |
Instance Method Details
#decode(string) ⇒ Object
29 30 31 |
# File 'lib/rexml/encoding.rb', line 29 def decode(string) string.encode(::Encoding::UTF_8, @encoding) end |
#encode(string) ⇒ Object
25 26 27 |
# File 'lib/rexml/encoding.rb', line 25 def encode(string) string.encode(@encoding) end |