Sha256: ce42a48b7e7514ec1681a80f3e2ea0a724a749ea59455dea404b51e067839dc6

Contents?: true

Size: 427 Bytes

Versions: 8

Compression:

Stored size: 427 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)
      end

      def get_mapping(name)
        attribute_types[name]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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