Module: Ray::TextHelper
Instance Method Summary collapse
-
#convert(string, enc = "UTF-8") ⇒ String
String converted to the asked encoding.
-
#internal_string(string, enc = "UTF-8") ⇒ String
String in Ray’s internal encoding.
Instance Method Details
#convert(string, enc = "UTF-8") ⇒ String
Returns string converted to the asked encoding.
18 19 20 |
# File 'lib/ray/text_helper.rb', line 18 def convert(string, enc = "UTF-8") string.encode enc end |
#internal_string(string, enc = "UTF-8") ⇒ String
Returns String in Ray’s internal encoding.
10 11 12 |
# File 'lib/ray/text_helper.rb', line 10 def internal_string(string, enc = "UTF-8") string.encode(InternalEncoding) end |