Class: Solr::Query::Request::ShardsPreference
- Inherits:
-
Object
- Object
- Solr::Query::Request::ShardsPreference
- Defined in:
- lib/solr/query/request/shards_preference.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
Returns the value of attribute properties.
Class Method Summary collapse
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(properties: []) ⇒ ShardsPreference
constructor
A new instance of ShardsPreference.
- #to_solr_s ⇒ Object
Constructor Details
#initialize(properties: []) ⇒ ShardsPreference
Returns a new instance of ShardsPreference.
13 14 15 |
# File 'lib/solr/query/request/shards_preference.rb', line 13 def initialize(properties: []) @properties = properties end |
Instance Attribute Details
#properties ⇒ Object
Returns the value of attribute properties.
7 8 9 |
# File 'lib/solr/query/request/shards_preference.rb', line 7 def properties @properties end |
Class Method Details
.none ⇒ Object
9 10 11 |
# File 'lib/solr/query/request/shards_preference.rb', line 9 def self.none new end |
Instance Method Details
#empty? ⇒ Boolean
17 18 19 |
# File 'lib/solr/query/request/shards_preference.rb', line 17 def empty? properties.empty? end |
#to_solr_s ⇒ Object
21 22 23 |
# File 'lib/solr/query/request/shards_preference.rb', line 21 def to_solr_s properties.map(&:to_solr_s).join(',') end |