Sha256: 1837f89c0402ee07ce8c9dcc54fd7535d2ca6d2d10fafad8791c2601c3c8f32e

Contents?: true

Size: 292 Bytes

Versions: 33

Compression:

Stored size: 292 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Integer #:nodoc:
      module Conversions #:nodoc:
        def set(value)
          value =~ /\d/ ? value.to_i : value
        end
        def get(value)
          value
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
mongoid-1.0.6 lib/mongoid/extensions/integer/conversions.rb
mongoid-1.0.5 lib/mongoid/extensions/integer/conversions.rb
mongoid-1.0.4 lib/mongoid/extensions/integer/conversions.rb
mongoid-1.0.3 lib/mongoid/extensions/integer/conversions.rb
mongoid-1.0.2 lib/mongoid/extensions/integer/conversions.rb
mongoid-1.0.1 lib/mongoid/extensions/integer/conversions.rb
mongoid-1.0.0 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.12.0 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.9 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.8 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.7 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.6 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.5 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.4 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.3 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.2 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.1 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.11.0 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.10.6 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.10.5 lib/mongoid/extensions/integer/conversions.rb