Class: Krikri::Indexer
- Inherits:
-
Object
- Object
- Krikri::Indexer
- Includes:
- EntityConsumer, SoftwareAgent
- Defined in:
- lib/krikri/indexer.rb
Overview
A SoftwareAgent to run indexing processes.
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#index_class ⇒ Object
readonly
Returns the value of attribute index_class.
-
#index_opts ⇒ Object
readonly
Returns the value of attribute index_opts.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Indexer
constructor
A new instance of Indexer.
- #run ⇒ Object
Methods included from EntityConsumer
Methods included from SoftwareAgent
Constructor Details
#initialize(opts = {}) ⇒ Indexer
Returns a new instance of Indexer.
30 31 32 33 34 |
# File 'lib/krikri/indexer.rb', line 30 def initialize(opts = {}) assign_generator_activity!(opts) @index_class = opts.delete(:index_class) @index_opts = opts end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
24 25 26 |
# File 'lib/krikri/indexer.rb', line 24 def index @index end |
#index_class ⇒ Object (readonly)
Returns the value of attribute index_class.
24 25 26 |
# File 'lib/krikri/indexer.rb', line 24 def index_class @index_class end |
#index_opts ⇒ Object (readonly)
Returns the value of attribute index_opts.
24 25 26 |
# File 'lib/krikri/indexer.rb', line 24 def index_opts @index_opts end |
Class Method Details
.queue_name ⇒ Object
26 27 28 |
# File 'lib/krikri/indexer.rb', line 26 def self.queue_name :indexing end |
Instance Method Details
#run ⇒ Object
40 41 42 |
# File 'lib/krikri/indexer.rb', line 40 def run index.update_from_activity(generator_activity) end |