lyrasis / aspace-client-tasks

Collection of thor tasks for processing data and interacting with the ASpace API
3 stars 1 forks source link

Refactor methods with field parameters to accept either a string or array #53

Closed eightBitter closed 1 year ago

eightBitter commented 1 year ago

Methods with field parameters that accept either a string or array are more flexible and resource efficient than having to call the method multiple times.

Something like:

fields = [fields].flatten
fields.each do |field|