Module: Mongoid::Criteria::Inspectable

Included in:
Mongoid::Criteria
Defined in:
build/mongoid-6.1/lib/mongoid/criteria/inspectable.rb

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.

Since:

  • 1.0.0



15
16
17
18
19
20
21
22
# File 'build/mongoid-6.1/lib/mongoid/criteria/inspectable.rb', line 15

def inspect
%Q{#<Mongoid::Criteria
  selector: #{selector.inspect}
  options:  #{options.inspect}
  class:    #{klass}
  embedded: #{embedded?}>
}
end