Methods

Class/Module Index [+]

Quicksearch

Mongoid::Inspection

Contains the bahviour around inspecting documents via Object#inspect.

Public Instance Methods

inspect() click to toggle source

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.