Method: WorldcatIdentities#extract_subject_headings

Defined in:
app/service_adaptors/worldcat_identities.rb

#extract_subject_headings(doc) ⇒ Object



185
186
187
188
189
190
191
192
193
# File 'app/service_adaptors/worldcat_identities.rb', line 185

def extract_subject_headings(doc)
  subject_headings = []
  (doc.search("biogSH")).each_with_index do |sh, i|
    subject_headings << sh.inner_text
    break if @num_of_subject_headings == i + 1
  end
  return nil if subject_headings.blank?
  "subject headings: " + subject_headings.join('; ')
end