Sha256: b66dc311f3a5576186562ca2acb34503314fc20460caa154b935591b4a62975f
Contents?: true
Size: 579 Bytes
Versions: 9
Compression:
Stored size: 579 Bytes
Contents
module Praxis::Mapper module ConnectionFactories class Simple def initialize(connection: nil, &block) @connection = connection if connection if block @checkout = block end if @connection && @checkout raise ArgumentError, 'May not provide both a connection and block' end end def checkout(connection_manager) return @connection if @connection @checkout.call end def release(connection_manager, connection) true end end end end
Version data entries
9 entries across 9 versions & 1 rubygems