module Atchu::Connection

Public Instance Methods

connect(yml_file) click to toggle source
# File lib/atchu/connection.rb, line 8
def connect yml_file
  return if yml_file.empty?
  if @connection.blank?
    ActiveRecord::Base.establish_connection(YAML.load_file(yml_file)[:db])
    @connection = ActiveRecord::Base.connection
  end
  @connection
end
get() click to toggle source
# File lib/atchu/connection.rb, line 17
def get
  @connection
end