Sha256: a86d850b5407dad6e57a05e01526e31027ab3c0b82e0d884b0100c5f4a1a83cc
Contents?: true
Size: 348 Bytes
Versions: 13
Compression:
Stored size: 348 Bytes
Contents
module CassandraObject module Types class IntegerType < BaseType REGEX = /\A[-+]?\d+\Z/ def encode(int) raise ArgumentError.new("#{int.inspect} is not an Integer.") unless int.kind_of?(Integer) int.to_s end def decode(str) return nil if str.empty? str.to_i end end end end
Version data entries
13 entries across 13 versions & 2 rubygems