Class: Mongoid::Matchers::HaveIndexForBase

Inherits:
Object
  • Object
show all
Defined in:
lib/matchers/indexes/have_index_for.rb

Direct Known Subclasses

HaveIndexFor

Instance Attribute Summary collapse

Instance Method Summary collapse

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_keyObject (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_optionsObject (readonly)

Returns the value of attribute index_options.



4
5
6
# File 'lib/matchers/indexes/have_index_for.rb', line 4

def index_options
  @index_options
end

#modelObject (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 with_options(index_options = {})
  @index_options = index_options
  self
end