Class: Elasticated::Mapping::Fields::StandardField
- Inherits:
-
Object
- Object
- Elasticated::Mapping::Fields::StandardField
- Defined in:
- lib/elasticated/mapping/fields/standard_field.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
abstract class child must implement ‘type()’.
Instance Method Summary collapse
- #build ⇒ Object
- #build_body ⇒ Object
-
#initialize(name) ⇒ StandardField
constructor
A new instance of StandardField.
Constructor Details
#initialize(name) ⇒ StandardField
Returns a new instance of StandardField.
11 12 13 |
# File 'lib/elasticated/mapping/fields/standard_field.rb', line 11 def initialize(name) self.name = name end |
Instance Attribute Details
#name ⇒ Object
abstract class child must implement ‘type()’
9 10 11 |
# File 'lib/elasticated/mapping/fields/standard_field.rb', line 9 def name @name end |
Instance Method Details
#build ⇒ Object
15 16 17 |
# File 'lib/elasticated/mapping/fields/standard_field.rb', line 15 def build { name => build_body } end |
#build_body ⇒ Object
19 20 21 |
# File 'lib/elasticated/mapping/fields/standard_field.rb', line 19 def build_body { type: type } end |