Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
require 'mongoid'
class Item; include Mongoid::Document; end
def clean_object(obj)
obj.instance_variables.each do |ivar|
obj.send(:remove_instance_variable, ivar) unless ivar == :@attributes
end
end
item = Item.new
clean_object(Item.new)
item.instance_variables # => [:@attributes]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.