class Exlibris::Primo::Facet

Primo facet holds the name of the facet and size (often approximate).

Attributes

accurate[RW]
accurate?[RW]

Public Class Methods

new(*args) click to toggle source
Calls superclass method Exlibris::Primo::WriteAttributes::new
# File lib/exlibris/primo/facet.rb, line 15
def initialize *args
  @raw_xml = args.last.delete(:raw_xml)
  super
end

Public Instance Methods

count()
Alias for: size
display_name() click to toggle source
# File lib/exlibris/primo/facet.rb, line 24
def display_name
  @display_name ||= (config.facet_labels[name] || name)
end
facet_values() click to toggle source
# File lib/exlibris/primo/facet.rb, line 33
def facet_values
  @facet_values ||= xml.root.search("//FACET_VALUES").collect do |facet_value|
    FacetValue.new(:raw_xml => facet_value.to_xml, :facet => self)
  end
end
name() click to toggle source
# File lib/exlibris/primo/facet.rb, line 20
def name
  @name = xml.root["NAME"]
end
size() click to toggle source
# File lib/exlibris/primo/facet.rb, line 28
def size
  @size = Integer(xml.root["COUNT"])
end
Also aliased as: count