Sha256: dccf16b44e3ad3278da835f4144de2c326065bc088ee7fc507bbb99553a88f71

Contents?: true

Size: 294 Bytes

Versions: 11

Compression:

Stored size: 294 Bytes

Contents

module CassandraObject
  module Types
    class ArrayType
      def encode(array)
        raise ArgumentError.new("#{self} requires an Array") unless array.kind_of?(Array)
        array.to_json
      end

      def decode(str)
        ActiveSupport::JSON.decode(str)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.5.0 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.4.2 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.4.1 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.4.0 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.3.6 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.3.5 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.3.4 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.3.3 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.3.2 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.3.1 lib/cassandra_object/types/array_type.rb
gotime-cassandra_object-2.3.0 lib/cassandra_object/types/array_type.rb