pulibrary / bibdata

Local API for retrieving bibliographic and other useful data from Alma (Ruby 3.2.0, Rails 7.1.3.4)
BSD 2-Clause "Simplified" License
16 stars 7 forks source link

Refactor use of #collect_matching_lines #2513

Closed sandbergja closed 1 month ago

sandbergja commented 1 month ago

The #collect_matching_lines method automatically assembles an array made of the return values of the block, so we don't need a separate array to collect those values.

See the traject documentation: https://www.rubydoc.info/gems/traject/3.4.0/Traject/MarcExtractor#collect_matching_lines-instance_method