Module: Elastics::Tasks::Config
- Included in:
- Elastics::Tasks
- Defined in:
- lib/elastics/tasks/config.rb
Overview
Module contains basic configuration methods. You should setup Elastics::Task yourself unless you you use ActiveRecord.
Instance Attribute Summary collapse
Instance Method Summary collapse
- #client ⇒ Object
- #client=(val) ⇒ Object
- #config ⇒ Object
- #config=(val) ⇒ Object
- #version_manager ⇒ Object
Instance Attribute Details
#base_paths ⇒ Object
8 9 10 |
# File 'lib/elastics/tasks/config.rb', line 8 def base_paths @base_paths ||= Dir.pwd end |
Instance Method Details
#client ⇒ Object
12 13 14 |
# File 'lib/elastics/tasks/config.rb', line 12 def client @client ||= Client.new config.slice(:host) end |
#client=(val) ⇒ Object
16 17 18 19 |
# File 'lib/elastics/tasks/config.rb', line 16 def client=(val) @version_manager = nil @client = val end |
#config ⇒ Object
28 29 30 |
# File 'lib/elastics/tasks/config.rb', line 28 def config @config ||= {} end |
#config=(val) ⇒ Object
32 33 34 35 |
# File 'lib/elastics/tasks/config.rb', line 32 def config=(val) @version_manager = nil @config = val end |
#version_manager ⇒ Object
21 22 23 24 25 26 |
# File 'lib/elastics/tasks/config.rb', line 21 def version_manager @version_manager ||= VersionManager.new(client, config.slice( :service_index, :index_prefix, )) end |