Sha256: 02c82a41181537ded95fde13fbe00fed37d3592120a21839706f13999cb2fbc0

Contents?: true

Size: 415 Bytes

Versions: 47

Compression:

Stored size: 415 Bytes

Contents

module CassandraObject
  module Types
    class BaseType
      attr_accessor :options
      def initialize(options = {})
        @options = options
      end

      def default
        options[:default].dup if options[:default]
      end

      def encode(value)
        value.to_s
      end

      def decode(str)
        str
      end

      def wrap(record, name, value)
        value
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.7.6 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.7.5 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.7.4 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.7.3 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.7.2 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.7.1 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.7.0 lib/cassandra_object/types/base_type.rb