class HighLevelBrowse::CallNumberRangeSet
An efficient set of CallNumberRanges from which to get topics
Public Instance Methods
topics_for(raw_lc)
click to toggle source
Returns the array of topic arrays for the given LC string @param [String] raw_lc A raw LC string (eg., 'qa 112.3 .A4 1990') @return [Array<Array<String>>] Arrays of topic labels
# File lib/high_level_browse/call_number_range.rb, line 12 def topics_for(raw_lc) normalized = Lcsort.normalize(HighLevelBrowse::CallNumberRange.preprocess(raw_lc)) self.search(normalized).map(&:topic_array).uniq end