Sha256: 31cc90bc24f91077987d294dc331aeb054d9e3e372245f35e5c6d7bbb344ea6b
Contents?: true
Size: 305 Bytes
Versions: 1
Compression:
Stored size: 305 Bytes
Contents
require 'sequel' require 'singleton' class DB include Singleton def self.conn instance.conn end def conn @conn ||= Sequel.connect(db_url) end private def db_url url = Grut::Config.instance.db_url fail 'Database connection is not configured' unless url url end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
grut-0.1.0 | lib/grut/db.rb |