Sha256: 157a17c61aeb27748f890b39ad9b22dc02fd040686d4f1f28a0b1ad987311b86

Contents?: true

Size: 431 Bytes

Versions: 11

Compression:

Stored size: 431 Bytes

Contents

module CassandraObject
  class Type
    class TypeMapping < Struct.new(:expected_type, :coder)
    end

    cattr_accessor :attribute_types
    self.attribute_types = {}.with_indifferent_access

    class << self
      def register(name, expected_type, coder)
        attribute_types[name] = TypeMapping.new(expected_type, coder.new)
      end

      def get_mapping(name)
        attribute_types[name]
      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/type.rb
gotime-cassandra_object-2.4.2 lib/cassandra_object/type.rb
gotime-cassandra_object-2.4.1 lib/cassandra_object/type.rb
gotime-cassandra_object-2.4.0 lib/cassandra_object/type.rb
gotime-cassandra_object-2.3.6 lib/cassandra_object/type.rb
gotime-cassandra_object-2.3.5 lib/cassandra_object/type.rb
gotime-cassandra_object-2.3.4 lib/cassandra_object/type.rb
gotime-cassandra_object-2.3.3 lib/cassandra_object/type.rb
gotime-cassandra_object-2.3.2 lib/cassandra_object/type.rb
gotime-cassandra_object-2.3.1 lib/cassandra_object/type.rb
gotime-cassandra_object-2.3.0 lib/cassandra_object/type.rb