Sha256: 6d0dcd047cbc69fd312ec82e235e7d0705287751411df5f7991d6161ba5f3352
Contents?: true
Size: 802 Bytes
Versions: 6
Compression:
Stored size: 802 Bytes
Contents
module DataMapper class Property class Integer < Numeric primitive ::Integer accept_options :serial protected # @api semipublic def initialize(model, name, options = {}, type = nil) if options.key?(:serial) && !kind_of?(Serial) warn "Integer #{name} with explicit :serial option is deprecated, use Serial instead (#{caller[2]})" end super end # Typecast a value to an Integer # # @param [#to_str, #to_i] value # value to typecast # # @return [Integer] # Integer constructed from value # # @api private def typecast_to_primitive(value) typecast_to_numeric(value, :to_i) end end # class Integer end # class Property end # module DataMapper
Version data entries
6 entries across 6 versions & 1 rubygems