Sha256: 50745ee68b655186cbfac8381309327351966ca0373b2b6590eafd3eb825df4a

Contents?: true

Size: 438 Bytes

Versions: 10

Compression:

Stored size: 438 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Set #:nodoc:
      # This module converts set into mongoid related objects.
      module Conversions #:nodoc:
        extend ActiveSupport::Concern

        module ClassMethods #:nodoc:
          def get(value)
            ::Set.new(value)
          end
          def set(value)
            value.to_a
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
mongoid-braxton-2.0.2 lib/mongoid/extensions/set/conversions.rb
mongoid-2.0.2 lib/mongoid/extensions/set/conversions.rb
mongoid-2.0.1 lib/mongoid/extensions/set/conversions.rb
mongoid-2.0.0 lib/mongoid/extensions/set/conversions.rb
mongoid-2.0.0.rc.8 lib/mongoid/extensions/set/conversions.rb
mongoid-2.0.0.rc.7 lib/mongoid/extensions/set/conversions.rb
stonegao-mongoid-2.0.0.rc.6 lib/mongoid/extensions/set/conversions.rb
mongoid-2.0.0.rc.6 lib/mongoid/extensions/set/conversions.rb
mongoid-2.0.0.rc.5 lib/mongoid/extensions/set/conversions.rb
mongoid-2.0.0.rc.4 lib/mongoid/extensions/set/conversions.rb