class Ansr::Facets::FacetItem
represents a facet value; which is a field value and its hit count
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/ansr/facets.rb, line 7 def initialize *args options = args.extract_options! # Backwards-compat method signature value = args.shift hits = args.shift options[:value] = value if value options[:hits] = hits if hits super(options) end
Public Instance Methods
as_json(props = nil)
click to toggle source
# File lib/ansr/facets.rb, line 24 def as_json(props = nil) table.as_json(props) end
label()
click to toggle source
Calls superclass method
# File lib/ansr/facets.rb, line 20 def label super || value end