Class: Kiba::Extend::Transforms::Marc::ExtractNameData
- Inherits:
-
Object
- Object
- Kiba::Extend::Transforms::Marc::ExtractNameData
- Defined in:
- lib/kiba/extend/transforms/marc/extract_name_data.rb
Overview
Extract :marcid and person name data (name, role term, role code, source field tag) from fields containing structured name data
Instance Method Summary collapse
-
#initialize ⇒ ExtractNameData
constructor
A new instance of ExtractNameData.
-
#process(record) ⇒ Object
Constructor Details
#initialize ⇒ ExtractNameData
Returns a new instance of ExtractNameData.
21 22 23 24 25 26 27 |
# File 'lib/kiba/extend/transforms/marc/extract_name_data.rb', line 21 def initialize @extractors = [ Marc::ExtractPersonNameData.new, Marc::ExtractOrgNameData.new, Marc::ExtractMeetingNameData.new ] end |
Instance Method Details
#process(record) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/kiba/extend/transforms/marc/extract_name_data.rb', line 29 def process(record) rows = [] extractors.each do |extractor| extractor.process(record) { |row| rows << row } end rows.each { |row| yield row } nil end |