123456789_123456789_123456789_123456789_123456789_

Module: Mongoid::Criteria::Inspectable

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/mongoid/criteria/inspectable.rb

Overview

Mixin module included in ::Mongoid::Criteria which adds custom #inspect method functionality.

Instance Method Summary

  • #inspect ⇒ String

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

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.

[ GitHub ]

  
# File 'lib/mongoid/criteria/inspectable.rb', line 18

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