Sha256: f9c3ee8d9fdbf2c898d53bf4136e005523cea5056a6603742efba4320ff37cfa

Contents?: true

Size: 293 Bytes

Versions: 7

Compression:

Stored size: 293 Bytes

Contents

module CassandraObject
  module Types
    class StringType < BaseType
      def encode(str)
        raise ArgumentError.new("#{self} requires a String") unless str.kind_of?(String)
        str.dup
      end

      def decode(str)
        str.force_encoding('UTF-8')
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.7.1 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.7.0 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.6.4 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.6.3 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.6.2 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.6.1 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.6.0 lib/cassandra_object/types/string_type.rb