Class: Solr::CoreConfiguration::EnvUrlCoreConfig
- Inherits:
-
CoreConfig
- Object
- CoreConfig
- Solr::CoreConfiguration::EnvUrlCoreConfig
- Defined in:
- lib/solr/core_configuration/core_config.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name: nil, fields: {}) ⇒ EnvUrlCoreConfig
constructor
A new instance of EnvUrlCoreConfig.
- #url ⇒ Object
Methods inherited from CoreConfig
#default?, #field_by_name, #uri
Constructor Details
#initialize(name: nil, fields: {}) ⇒ EnvUrlCoreConfig
Returns a new instance of EnvUrlCoreConfig.
32 33 34 35 36 |
# File 'lib/solr/core_configuration/core_config.rb', line 32 def initialize(name: nil, fields: {}) @name = name @fields = fields @default = false end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
30 31 32 |
# File 'lib/solr/core_configuration/core_config.rb', line 30 def fields @fields end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
30 31 32 |
# File 'lib/solr/core_configuration/core_config.rb', line 30 def name @name end |
Instance Method Details
#url ⇒ Object
38 39 40 41 |
# File 'lib/solr/core_configuration/core_config.rb', line 38 def url raise ArgumentError, "Solr URL can't be nil" if ENV['SOLR_URL'].nil? ENV['SOLR_URL'] end |