Sha256: ce702008c0b6ad1f0d4fc2fc9aad0903b359492a23d5071a39321c3e00cabdf7

Contents?: true

Size: 274 Bytes

Versions: 43

Compression:

Stored size: 274 Bytes

Contents

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

43 entries across 43 versions & 1 rubygems

Version Path
mongoid-0.9.4 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.9.3 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.9.2 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.9.1 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.9.0 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.10 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.9 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.8 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.7 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.6 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.5 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.4 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.3 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.2 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.8.1 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.7.10 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.7.9 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.7.8 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.7.7 lib/mongoid/extensions/integer/conversions.rb
mongoid-0.7.6 lib/mongoid/extensions/integer/conversions.rb