Sha256: 45afa2b2b9bddc9bfe950e439e28275f947481743cdc8bfbe0ba60fb8699ddfe

Contents?: true

Size: 355 Bytes

Versions: 117

Compression:

Stored size: 355 Bytes

Contents

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

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

Version data entries

117 entries across 117 versions & 2 rubygems

Version Path
sessionm-cassandra_object-4.0.32 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.31 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.30 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.29 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.28 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.27 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.26 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.25 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.24 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.23 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.22 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.21 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.20 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-2.7.5 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-2.7.4 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.18 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.17 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.16 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.15 lib/cassandra_object/types/array_type.rb
sessionm-cassandra_object-4.0.14 lib/cassandra_object/types/array_type.rb