Sha256: de58372cb9d17786fa21aa9673277179f294229a87d5c7838cf48f76a6ac948a

Contents?: true

Size: 339 Bytes

Versions: 27

Compression:

Stored size: 339 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 wrap(record, name, value)
        (value.frozen? ? value.dup : value).force_encoding('UTF-8')
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.10.6 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.10.5 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.10.4 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.10.3 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.10.2 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.10.1 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.10.0 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.9.2 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.9.1 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.9.0 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.8.6 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.8.5 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.8.4 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.8.3 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.8.2 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.8.1 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.8.0 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.7.12 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.7.11 lib/cassandra_object/types/string_type.rb
gotime-cassandra_object-2.7.10 lib/cassandra_object/types/string_type.rb