class Cequel::Type::String
Abstract superclass for types that represent character data
@abstract Subclasses must implement `#encoding`, which returns the name
of the Ruby encoding corresponding to the character encoding used for values of this type
Public Instance Methods
cast(value)
click to toggle source
# File lib/cequel/type.rb, line 188 def cast(value) str = String(value) str.encoding.name == encoding ? str : str.dup.force_encoding(encoding) end