class Superstore::Types::StringType
Public Instance Methods
cast_value(value)
click to toggle source
# File lib/superstore/types/string_type.rb, line 14 def cast_value(value) value.to_s end
serialize(str)
click to toggle source
# File lib/superstore/types/string_type.rb, line 4 def serialize(str) return if str.nil? unless str.encoding == Encoding::UTF_8 (str.frozen? ? str.dup : str).force_encoding('UTF-8') else str end end