123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Collection::View::Immutable

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/mongo/collection/view/immutable.rb

Overview

Defines behavior around views being configurable and immutable.

Since:

  • 2.0.0

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#optionsHash (readonly)

Returns:

  • (Hash)

    options The additional query options.

Since:

  • 2.0.0

[ GitHub ]

  
# File 'lib/mongo/collection/view/immutable.rb', line 28

attr_reader :options

Instance Method Details

#configure(field, value) (private)

Since:

  • 2.0.0

[ GitHub ]

  
# File 'lib/mongo/collection/view/immutable.rb', line 32

def configure(field, value)
  return options[field] if value.nil?
  new(options.merge(field => value))
end