Sha256: fdf6180794d7283ad1e421b4f7de13f01d6b18181db764e3a8c203d0e86c9a13
Contents?: true
Size: 414 Bytes
Versions: 10
Compression:
Stored size: 414 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 def wrap(record, name, value) value.to_i end end end end
Version data entries
10 entries across 10 versions & 1 rubygems