Class Index [+]

Quicksearch

DataMapper::Property::Integer

Public Class Methods

new(model, name, options = {}) click to toggle source

@api semipublic

    # File lib/dm-core/property/integer.rb, line 11
11:       def initialize(model, name, options = {})
12:         if options.key?(:serial) && !kind_of?(Serial)
13:           raise "Integer #{name} with explicit :serial option is deprecated, use Serial instead (#{caller[2]})"
14:         end
15:         super
16:       end

Protected Instance Methods

typecast_to_primitive(value) click to toggle source

Typecast a value to an Integer

@param [#, #] value

  value to typecast

@return [Integer]

  Integer constructed from value

@api private

    # File lib/dm-core/property/integer.rb, line 27
27:       def typecast_to_primitive(value)
28:         typecast_to_numeric(value, :to_i)
29:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.