Sha256: ea5b5e5baa143e9ef94c9d75f101da369f0da61169c9347f32791acc1b54d1f9
Contents?: true
Size: 416 Bytes
Versions: 31
Compression:
Stored size: 416 Bytes
Contents
module Superstore module Types class StringType < BaseType def encode(str) raise ArgumentError.new("#{str.inspect} is not a String") unless str.kind_of?(String) unless str.encoding == Encoding::UTF_8 (str.frozen? ? str.dup : str).force_encoding('UTF-8') else str end end def typecast(value) value.to_s end end end end
Version data entries
31 entries across 31 versions & 1 rubygems