class Dbla::Response::Facets::FacetItem

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/dbla/response/facets.rb, line 41
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/dbla/response/facets.rb, line 58
def as_json(props = nil)
  table.as_json(props)
end
label() click to toggle source
Calls superclass method
# File lib/dbla/response/facets.rb, line 54
def label
  super || value
end