Class: Mongoid::Matchers::HaveIndexForBase
- Inherits:
-
Object
- Object
- Mongoid::Matchers::HaveIndexForBase
- Defined in:
- lib/matchers/indexes/have_index_for.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#index_key ⇒ Object
readonly
Returns the value of attribute index_key.
-
#index_options ⇒ Object
readonly
Returns the value of attribute index_options.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(index_key) ⇒ HaveIndexForBase
constructor
A new instance of HaveIndexForBase.
- #with_options(index_options = {}) ⇒ Object
Constructor Details
#initialize(index_key) ⇒ HaveIndexForBase
Returns a new instance of HaveIndexForBase.
6 7 8 |
# File 'lib/matchers/indexes/have_index_for.rb', line 6 def initialize(index_key) @index_key = index_key.symbolize_keys end |
Instance Attribute Details
#index_key ⇒ Object (readonly)
Returns the value of attribute index_key.
4 5 6 |
# File 'lib/matchers/indexes/have_index_for.rb', line 4 def index_key @index_key end |
#index_options ⇒ Object (readonly)
Returns the value of attribute index_options.
4 5 6 |
# File 'lib/matchers/indexes/have_index_for.rb', line 4 def @index_options end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
4 5 6 |
# File 'lib/matchers/indexes/have_index_for.rb', line 4 def model @model end |
Instance Method Details
#with_options(index_options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/matchers/indexes/have_index_for.rb', line 10 def ( = {}) @index_options = self end |