Sha256: 40e12572a207f7141a95036f533b086ec25a64e74bf0d8fd7628f4ef8dceaf36

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 Bytes

Contents

module DataMapper
  class Property
    class Integer < Numeric
      load_as         ::Integer
      dump_as         ::Integer
      coercion_method :to_integer

      accept_options :serial

    protected

      # @api semipublic
      def initialize(model, name, options = {})
        if options.key?(:serial) && !kind_of?(Serial)
          raise "Integer #{name} with explicit :serial option is deprecated, use Serial instead (#{caller[2]})"
        end
        super
      end

    end # class Integer
  end # class Property
end # module DataMapper

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ghost_dm-core-1.3.0.beta lib/dm-core/property/integer.rb