In plugins.md it says that you should add a after_initialize block to override core classes. However, this only works for Rails apps. Since the backend is a Sinatra app the doc misses a part on how to extend backend core classes. This would be helpful for people like me who are not too familiar with Ruby/Rack/Sinatra/Rails.
After some tinkering I found out that I could use ArchivesSpaceService.loaded_hook do for it. But it also worked without that. I needed to better understand how this monkey-patching works in Ruby.
In plugins.md it says that you should add a
after_initialize
block to override core classes. However, this only works for Rails apps. Since the backend is a Sinatra app the doc misses a part on how to extend backend core classes. This would be helpful for people like me who are not too familiar with Ruby/Rack/Sinatra/Rails.