Class: Kiba::Extend::Transforms::Marc::ExtractIds
- Inherits:
-
Object
- Object
- Kiba::Extend::Transforms::Marc::ExtractIds
- Defined in:
- lib/kiba/extend/transforms/marc/extract_ids.rb
Overview
Extract :marcid values from all records in file based on config settings defined in Marc
Instance Method Summary collapse
-
#initialize(id_target: Kiba::Extend::Marc.id_target_field) ⇒ ExtractIds
constructor
A new instance of ExtractIds.
-
#process(record) ⇒ Hash{ Symbol => String, nil }
Constructor Details
#initialize(id_target: Kiba::Extend::Marc.id_target_field) ⇒ ExtractIds
Returns a new instance of ExtractIds.
21 22 23 24 |
# File 'lib/kiba/extend/transforms/marc/extract_ids.rb', line 21 def initialize(id_target: Kiba::Extend::Marc.id_target_field) @id_target = id_target @idextractor = Kiba::Extend::Utils::MarcIdExtractor.new end |
Instance Method Details
#process(record) ⇒ Hash{ Symbol => String, nil }
28 29 30 |
# File 'lib/kiba/extend/transforms/marc/extract_ids.rb', line 28 def process(record) {id_target => idextractor.call(record)} end |