Class: ElasticAdapter::DocumentType
- Inherits:
-
Object
- Object
- ElasticAdapter::DocumentType
- Defined in:
- lib/elastic_adapter/document_type.rb
Overview
This class is intended to hold information about a document in an elasticsearch index
Instance Attribute Summary collapse
-
#mappings ⇒ Hash
readonly
the mappings for the document.
-
#name ⇒ String
readonly
the name of the document.
Instance Method Summary collapse
-
#initialize(name, mappings) ⇒ DocumentType
constructor
A new instance of DocumentType.
Constructor Details
#initialize(name, mappings) ⇒ DocumentType
Returns a new instance of DocumentType.
26 27 28 29 |
# File 'lib/elastic_adapter/document_type.rb', line 26 def initialize(name, mappings) @name = name @mappings = mappings end |
Instance Attribute Details
#mappings ⇒ Hash (readonly)
the mappings for the document
21 22 23 |
# File 'lib/elastic_adapter/document_type.rb', line 21 def mappings @mappings end |
#name ⇒ String (readonly)
the name of the document
21 22 23 |
# File 'lib/elastic_adapter/document_type.rb', line 21 def name @name end |