Sha256: 6bf654b9e5d71a2969db5db3dcdb9311962f7e5a24c855fc89577a7daf95cbda

Contents?: true

Size: 229 Bytes

Versions: 26

Compression:

Stored size: 229 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Mixins
    module Database
      def with_db_connection
        Mihari::Database.connect
        yield
      ensure
        Mihari::Database.close
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
mihari-5.0.1 lib/mihari/mixins/database.rb
mihari-5.0.0 lib/mihari/mixins/database.rb
mihari-4.12.0 lib/mihari/mixins/database.rb
mihari-4.11.0 lib/mihari/mixins/database.rb
mihari-4.10.0 lib/mihari/mixins/database.rb
mihari-4.9.0 lib/mihari/mixins/database.rb
mihari-4.8.0 lib/mihari/mixins/database.rb
mihari-4.7.4 lib/mihari/mixins/database.rb
mihari-4.7.3 lib/mihari/mixins/database.rb
mihari-4.7.2 lib/mihari/mixins/database.rb
mihari-4.7.1 lib/mihari/mixins/database.rb
mihari-4.7.0 lib/mihari/mixins/database.rb
mihari-4.6.1 lib/mihari/mixins/database.rb
mihari-4.6.0 lib/mihari/mixins/database.rb
mihari-4.5.3 lib/mihari/mixins/database.rb
mihari-4.5.2 lib/mihari/mixins/database.rb
mihari-4.5.1 lib/mihari/mixins/database.rb
mihari-4.5.0 lib/mihari/mixins/database.rb
mihari-4.4.1 lib/mihari/mixins/database.rb
mihari-4.4.0 lib/mihari/mixins/database.rb