Class: Solr::CoreConfiguration::DynamicField
- Inherits:
-
Object
- Object
- Solr::CoreConfiguration::DynamicField
- Defined in:
- lib/solr/core_configuration/dynamic_field.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#solr_name ⇒ Object
readonly
Returns the value of attribute solr_name.
Instance Method Summary collapse
- #build(name) ⇒ Object
-
#initialize(name:, solr_name:) ⇒ DynamicField
constructor
A new instance of DynamicField.
Constructor Details
#initialize(name:, solr_name:) ⇒ DynamicField
Returns a new instance of DynamicField.
6 7 8 9 10 |
# File 'lib/solr/core_configuration/dynamic_field.rb', line 6 def initialize(name:, solr_name:) @name = name @solr_name = solr_name freeze end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/solr/core_configuration/dynamic_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/dynamic_field.rb', line 4 def solr_name @solr_name end |
Instance Method Details
#build(name) ⇒ Object
12 13 14 |
# File 'lib/solr/core_configuration/dynamic_field.rb', line 12 def build(name) solr_name.gsub('*', name.to_s) end |