Sha256: c266fac21c535af6226665035234ff7e74b804406d2f94228091acd0858dfd33

Contents?: true

Size: 420 Bytes

Versions: 17

Compression:

Stored size: 420 Bytes

Contents

# frozen_string_literal: true

require "active_support/core_ext/module/delegation"

class Combustion::Databases::Base
  def initialize(configuration)
    @configuration = configuration
  end

  def reset
    drop
    create

    establish_connection Rails.env.to_sym
  end

  private

  attr_reader :configuration

  delegate :establish_connection, :connection, :to => :base

  def base
    ActiveRecord::Base
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
combustion-1.5.0 lib/combustion/databases/base.rb
combustion-1.4.0 lib/combustion/databases/base.rb
combustion-1.3.7 lib/combustion/databases/base.rb
combustion-1.3.6 lib/combustion/databases/base.rb
combustion-1.3.5 lib/combustion/databases/base.rb
combustion-1.3.4 lib/combustion/databases/base.rb
combustion-1.3.3 lib/combustion/databases/base.rb
combustion-1.3.2 lib/combustion/databases/base.rb
combustion-1.3.1 lib/combustion/databases/base.rb
combustion-1.3.0 lib/combustion/databases/base.rb
combustion-1.2.0 lib/combustion/databases/base.rb
combustion-1.1.2 lib/combustion/databases/base.rb
combustion-1.1.1 lib/combustion/databases/base.rb
combustion-1.1.0 lib/combustion/databases/base.rb
combustion-1.0.0 lib/combustion/databases/base.rb
combustion-0.9.1 lib/combustion/databases/base.rb
combustion-0.9.0 lib/combustion/databases/base.rb