Class: Solr::Query::Response::FieldFacets
- Inherits:
-
Object
- Object
- Solr::Query::Response::FieldFacets
- Includes:
- Enumerable
- Defined in:
- lib/solr/query/response/field_facets.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#facet_values ⇒ Object
readonly
Returns the value of attribute facet_values.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#subfacets ⇒ Object
readonly
Returns the value of attribute subfacets.
Instance Method Summary collapse
- #each(&b) ⇒ Object
-
#initialize(field:, facet_values:, count:, subfacets: []) ⇒ FieldFacets
constructor
A new instance of FieldFacets.
Constructor Details
#initialize(field:, facet_values:, count:, subfacets: []) ⇒ FieldFacets
Returns a new instance of FieldFacets.
9 10 11 12 13 14 15 16 |
# File 'lib/solr/query/response/field_facets.rb', line 9 def initialize(field:, facet_values:, count:, subfacets: []) @field = field @facet_values = facet_values @count = count @subfacets = subfacets freeze end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
7 8 9 |
# File 'lib/solr/query/response/field_facets.rb', line 7 def count @count end |
#facet_values ⇒ Object (readonly)
Returns the value of attribute facet_values.
7 8 9 |
# File 'lib/solr/query/response/field_facets.rb', line 7 def facet_values @facet_values end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
7 8 9 |
# File 'lib/solr/query/response/field_facets.rb', line 7 def field @field end |
#subfacets ⇒ Object (readonly)
Returns the value of attribute subfacets.
7 8 9 |
# File 'lib/solr/query/response/field_facets.rb', line 7 def subfacets @subfacets end |
Instance Method Details
#each(&b) ⇒ Object
18 19 20 21 |
# File 'lib/solr/query/response/field_facets.rb', line 18 def each(&b) return enum_for(:each) unless block_given? facet_values.each(&b) end |