Sha256: 1fd0d1e916856e534860d6204d7a533686efa23ddd01a7e1a854b7b3936ebb1d

Contents?: true

Size: 459 Bytes

Versions: 13

Compression:

Stored size: 459 Bytes

Contents

module Mongoid #:nodoc:
  module Attributes #:nodoc:
    # Process the provided attributes casting them to their proper values if a
    # field exists for them on the +Document+. This will be limited to only the
    # attributes provided in the suppied +Hash+ so that no extra nil values get
    # put into the document's attributes.
    def process(attrs = {})
      attrs.each_pair do |key, value|
        send("#{key}=", value)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mongoid-0.9.4 lib/mongoid/attributes.rb
mongoid-0.9.3 lib/mongoid/attributes.rb
mongoid-0.9.2 lib/mongoid/attributes.rb
mongoid-0.9.1 lib/mongoid/attributes.rb
mongoid-0.9.0 lib/mongoid/attributes.rb
mongoid-0.8.10 lib/mongoid/attributes.rb
mongoid-0.8.9 lib/mongoid/attributes.rb
mongoid-0.8.8 lib/mongoid/attributes.rb
mongoid-0.8.7 lib/mongoid/attributes.rb
mongoid-0.8.6 lib/mongoid/attributes.rb
mongoid-0.8.5 lib/mongoid/attributes.rb
mongoid-0.8.4 lib/mongoid/attributes.rb
mongoid-0.8.3 lib/mongoid/attributes.rb