Sha256: cf637f1dfa870daf642ef18f7f937a49269c75eb1f1f4487d7579ebf1dacffce

Contents?: true

Size: 477 Bytes

Versions: 4

Compression:

Stored size: 477 Bytes

Contents

# encoding: utf-8
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

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-0.9.8 lib/mongoid/attributes.rb
mongoid-0.9.7 lib/mongoid/attributes.rb
mongoid-0.9.6 lib/mongoid/attributes.rb
mongoid-0.9.5 lib/mongoid/attributes.rb