sul-dlss / cocina-models

Cocina repository data model (implemented in Ruby)
https://sul-dlss.github.io/cocina-models/
3 stars 0 forks source link

Extract a context object for instantiating sub-builders #435

Closed jcoyne closed 2 years ago

jcoyne commented 2 years ago

https://github.com/sul-dlss/cocina-models/blob/67a3f989da680a3c2214b0dee9b51835d53bdc41/lib/cocina/from_fedora/descriptive/descriptive_builder.rb#L54-L55

All these builders need the same type of context, so encapsulate this as an object.

jcoyne commented 2 years ago

I don't think this is easily achievable due to related resources using the same descriptive builder.