Contains the bahviour around inspecting documents via
Object#inspect
.
Returns the class name plus its attributes. If using dynamic fields will include those as well.
@example Inspect the document.
person.inspect
@return [ String ] A nice pretty string to look at.
# File lib/mongoid/inspection.rb, line 14 def inspect inspection = [] inspection.concat(inspect_fields).concat(inspect_dynamic_fields) "#<#{self.class.name} _id: #{id}, #{inspection * ', '}>" end