Class: Solr::CoreConfiguration::DynamicField

Inherits:
Object
  • Object
show all
Defined in:
lib/solr/core_configuration/dynamic_field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (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_nameObject (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