Module: Mongoid::Criterion::Inspection

Included in:
Mongoid::Criteria
Defined in:
lib/mongoid/criterion/inspection.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#inspectString

Get a pretty string representation of the criteria, including the selector, options, matching count and documents for inspection.

Examples:

Inspect the criteria.

criteria.inspect

Returns:

  • (String)

    The inspection string.



13
14
15
16
17
18
19
# File 'lib/mongoid/criterion/inspection.rb', line 13

def inspect
  "#<Mongoid::Criteria\n" <<
  "  selector: #{selector.inspect},\n" <<
  "  options:  #{options.inspect},\n" <<
  "  class:    #{klass},\n" <<
  "  embedded: #{embedded}>\n"
end