dry-rb/dry-system

View on GitHub
examples/custom_configuration_auto_register/system/boot/persistence.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

App.boot(:persistence) do |persistence|
  init do
    require 'sequel'
  end

  start do
    persistence.register('persistence.db', Sequel.connect('sqlite::memory'))
  end

  stop do
    db.close_connection
  end
end