Class: ElasticRecord::Index::Configurator
- Inherits:
-
Object
- Object
- ElasticRecord::Index::Configurator
- Defined in:
- lib/elastic_record/index/configurator.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Instance Method Summary collapse
-
#initialize(index) ⇒ Configurator
constructor
A new instance of Configurator.
- #property(name, options) ⇒ Object
Constructor Details
#initialize(index) ⇒ Configurator
Returns a new instance of Configurator.
5 6 7 |
# File 'lib/elastic_record/index/configurator.rb', line 5 def initialize(index) @index = index end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
4 5 6 |
# File 'lib/elastic_record/index/configurator.rb', line 4 def index @index end |
Instance Method Details
#property(name, options) ⇒ Object
9 10 11 |
# File 'lib/elastic_record/index/configurator.rb', line 9 def property(name, ) index.mapping[:properties][name.to_sym] = end |