# File lib/mongoid/document.rb, line 126 def initialize(attrs = nil, options = nil) _building do @new_record = true @attributes ||= {} options ||= {} process(attrs, options[:as] || :default, !options[:without_protection]) do identify apply_defaults yield(self) if block_given? end run_callbacks(:initialize) { self } end end