Sha256: 85a491d75748cba7e99d0870947d0f4309a17e2fbd35bbb9b463314d1eecd2d2
Contents?: true
Size: 602 Bytes
Versions: 12
Compression:
Stored size: 602 Bytes
Contents
require "dry-configurable" require "dry-transaction" module <%= config[:camel_cased_app_name] %> class Transactions extend Dry::Configurable attr_reader :options setting :container setting :options, {} def self.define(&block) yield(new(options)) end def self.options {container: config.container}.merge(config.options) end def initialize(options) @options = options end def container options[:container] end def define(name, &block) container.register(name, Dry.Transaction(options, &block)) end end end
Version data entries
12 entries across 12 versions & 1 rubygems