Class: Solr::CoreConfiguration::Field
- Inherits:
-
Object
- Object
- Solr::CoreConfiguration::Field
- Defined in:
- lib/solr/core_configuration/field.rb
Instance Attribute Summary collapse
-
#dynamic_field ⇒ Object
readonly
Returns the value of attribute dynamic_field.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#solr_name ⇒ Object
readonly
Returns the value of attribute solr_name.
Instance Method Summary collapse
-
#initialize(name:, dynamic_field: nil, solr_name: nil) ⇒ Field
constructor
A new instance of Field.
- #solr_field_name ⇒ Object
Constructor Details
#initialize(name:, dynamic_field: nil, solr_name: nil) ⇒ Field
Returns a new instance of Field.
6 7 8 9 10 11 |
# File 'lib/solr/core_configuration/field.rb', line 6 def initialize(name:, dynamic_field: nil, solr_name: nil) @name = name @dynamic_field = dynamic_field @solr_name = solr_name freeze end |
Instance Attribute Details
#dynamic_field ⇒ Object (readonly)
Returns the value of attribute dynamic_field.
4 5 6 |
# File 'lib/solr/core_configuration/field.rb', line 4 def dynamic_field @dynamic_field end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/solr/core_configuration/field.rb', line 4 def name @name end |
#solr_name ⇒ Object (readonly)
Returns the value of attribute solr_name.
4 5 6 |
# File 'lib/solr/core_configuration/field.rb', line 4 def solr_name @solr_name end |
Instance Method Details
#solr_field_name ⇒ Object
13 14 15 16 17 |
# File 'lib/solr/core_configuration/field.rb', line 13 def solr_field_name return solr_name.to_s if solr_name return dynamic_field.build(name) if dynamic_field name.to_s end |