Class: Elastics::Tasks
- Inherits:
-
Object
- Object
- Elastics::Tasks
- Defined in:
- lib/elastics/tasks.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #create_indices ⇒ Object
- #default_options ⇒ Object
- #delete_indices ⇒ Object
-
#initialize(overrides = {}) ⇒ Tasks
constructor
A new instance of Tasks.
Constructor Details
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/elastics/tasks.rb', line 4 def @options end |
Instance Method Details
#create_indices ⇒ Object
17 18 19 20 |
# File 'lib/elastics/tasks.rb', line 17 def create_indices Conf.indices.delete_indices([:index]) if [:force] Conf.indices.create_indices([:index]) end |
#default_options ⇒ Object
12 13 14 15 |
# File 'lib/elastics/tasks.rb', line 12 def @default_options ||= { :force => false, :index => Conf.indices.keys } end |
#delete_indices ⇒ Object
22 23 24 |
# File 'lib/elastics/tasks.rb', line 22 def delete_indices Conf.indices.delete_indices([:index]) end |