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.12.1 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.12.0 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.9 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.8 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.7 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.6 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.5 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.4 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.3 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.2 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.1 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.11.0 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.10.11 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.10.10 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.10.9 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.10.8 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.10.7 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.10.6 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.10.5 lib/cassandra_object/types/base_type.rb
gotime-cassandra_object-2.10.4 lib/cassandra_object/types/base_type.rb