Class: AgnosticBackend::Indexable::Config::Entry
- Inherits:
-
Object
- Object
- AgnosticBackend::Indexable::Config::Entry
- Defined in:
- lib/agnostic_backend/indexable/config.rb
Instance Attribute Summary collapse
-
#index_class ⇒ Object
readonly
Returns the value of attribute index_class.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #create_index ⇒ Object
-
#initialize(index_class:, indexable_class:, primary: true, **options) ⇒ Entry
constructor
A new instance of Entry.
- #primary? ⇒ Boolean
Constructor Details
#initialize(index_class:, indexable_class:, primary: true, **options) ⇒ Entry
Returns a new instance of Entry.
11 12 13 14 15 16 |
# File 'lib/agnostic_backend/indexable/config.rb', line 11 def initialize(index_class:, indexable_class:, primary: true, **) @index_class = index_class @indexable_class = indexable_class @primary = primary @options = end |
Instance Attribute Details
#index_class ⇒ Object (readonly)
Returns the value of attribute index_class.
8 9 10 |
# File 'lib/agnostic_backend/indexable/config.rb', line 8 def index_class @index_class end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/agnostic_backend/indexable/config.rb', line 8 def @options end |
Instance Method Details
#create_index ⇒ Object
22 23 24 |
# File 'lib/agnostic_backend/indexable/config.rb', line 22 def create_index @index_class.new(@indexable_class, primary: @primary, **@options) end |
#primary? ⇒ Boolean
18 19 20 |
# File 'lib/agnostic_backend/indexable/config.rb', line 18 def primary? @primary end |