Class: Kithe::Indexable::IndexableSettings
- Inherits:
-
Object
- Object
- Kithe::Indexable::IndexableSettings
- Defined in:
- app/indexing/kithe/indexable.rb
Instance Attribute Summary collapse
-
#disable_callbacks ⇒ Object
Returns the value of attribute disable_callbacks.
-
#model_name_solr_field ⇒ Object
Returns the value of attribute model_name_solr_field.
-
#solr_url ⇒ Object
Returns the value of attribute solr_url.
-
#writer_class_name ⇒ Object
Returns the value of attribute writer_class_name.
-
#writer_settings ⇒ Object
Use configured solr_url, and merge together with configured writer_settings.
Instance Method Summary collapse
-
#initialize(solr_url:, writer_class_name:, writer_settings:, model_name_solr_field:, disable_callbacks: false) ⇒ IndexableSettings
constructor
A new instance of IndexableSettings.
-
#writer_class ⇒ Object
Turn writer_class_name into an actual Class object.
-
#writer_instance!(additional_settings = {}) ⇒ Object
Instantiate a new writer based on ‘writer_class_name` and `writer_settings`.
Constructor Details
#initialize(solr_url:, writer_class_name:, writer_settings:, model_name_solr_field:, disable_callbacks: false) ⇒ IndexableSettings
Returns a new instance of IndexableSettings.
57 58 59 60 61 62 |
# File 'app/indexing/kithe/indexable.rb', line 57 def initialize(solr_url:, writer_class_name:, writer_settings:, model_name_solr_field:, disable_callbacks: false) @solr_url = solr_url @writer_class_name = writer_class_name @writer_settings = writer_settings @model_name_solr_field = model_name_solr_field end |
Instance Attribute Details
#disable_callbacks ⇒ Object
Returns the value of attribute disable_callbacks.
56 57 58 |
# File 'app/indexing/kithe/indexable.rb', line 56 def disable_callbacks @disable_callbacks end |
#model_name_solr_field ⇒ Object
Returns the value of attribute model_name_solr_field.
56 57 58 |
# File 'app/indexing/kithe/indexable.rb', line 56 def model_name_solr_field @model_name_solr_field end |
#solr_url ⇒ Object
Returns the value of attribute solr_url.
56 57 58 |
# File 'app/indexing/kithe/indexable.rb', line 56 def solr_url @solr_url end |
#writer_class_name ⇒ Object
Returns the value of attribute writer_class_name.
56 57 58 |
# File 'app/indexing/kithe/indexable.rb', line 56 def writer_class_name @writer_class_name end |
#writer_settings ⇒ Object
Use configured solr_url, and merge together with configured writer_settings
66 67 68 |
# File 'app/indexing/kithe/indexable.rb', line 66 def writer_settings @writer_settings end |
Instance Method Details
#writer_class ⇒ Object
Turn writer_class_name into an actual Class object.
75 76 77 |
# File 'app/indexing/kithe/indexable.rb', line 75 def writer_class writer_class_name.constantize end |
#writer_instance!(additional_settings = {}) ⇒ Object
Instantiate a new writer based on ‘writer_class_name` and `writer_settings`
80 81 82 |
# File 'app/indexing/kithe/indexable.rb', line 80 def writer_instance!(additional_settings = {}) writer_class.new(writer_settings.merge(additional_settings)) end |