Class: Solr::Query::Request::ShardsPreferences::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/solr/query/request/shards_preferences/property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ Property

Returns a new instance of Property.



8
9
10
11
12
# File 'lib/solr/query/request/shards_preferences/property.rb', line 8

def initialize(name:, value:)
  @name = name
  @value = value
  freeze
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/solr/query/request/shards_preferences/property.rb', line 6

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



6
7
8
# File 'lib/solr/query/request/shards_preferences/property.rb', line 6

def value
  @value
end

Instance Method Details

#to_solr_sObject



14
15
16
# File 'lib/solr/query/request/shards_preferences/property.rb', line 14

def to_solr_s
  "#{name}:#{value}"
end