Class: Blacklight::Solr::Response::Facets::FacetItem
- Inherits:
 - 
      OpenStruct
      
        
- Object
 - OpenStruct
 - Blacklight::Solr::Response::Facets::FacetItem
 
 
- Defined in:
 - lib/blacklight/solr/response/facets.rb
 
Overview
represents a facet value; which is a field value and its hit count
Instance Method Summary collapse
- #as_json(props = nil) ⇒ Object
 - 
  
    
      #initialize(*args)  ⇒ FacetItem 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of FacetItem.
 - #label ⇒ Object
 
Constructor Details
#initialize(*args) ⇒ FacetItem
Returns a new instance of FacetItem.
      8 9 10 11 12 13 14 15 16 17 18 19  | 
    
      # File 'lib/blacklight/solr/response/facets.rb', line 8 def initialize *args = args. # Backwards-compat method signature value = args.shift hits = args.shift [:value] = value if value [:hits] = hits if hits super() end  | 
  
Instance Method Details
#as_json(props = nil) ⇒ Object
      25 26 27  | 
    
      # File 'lib/blacklight/solr/response/facets.rb', line 25 def as_json(props = nil) table.as_json(props) end  | 
  
#label ⇒ Object
      21 22 23  | 
    
      # File 'lib/blacklight/solr/response/facets.rb', line 21 def label super || value end  |