Sha256: 31186e880265b05f31d393d7748332681d20cca5b4c57058b7661c6f9925ffbf

Contents?: true

Size: 323 Bytes

Versions: 4

Compression:

Stored size: 323 Bytes

Contents

module SqliteExt
  module InitInjection
    def initialize(file, *other_init_args)
      if block_given?
        super file, *other_init_args do |db|
          SqliteExt.enhance_db_session self
          yield db
        end
      else
        db = super
        SqliteExt.enhance_db_session db
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sqlite_ext-0.2.1 lib/sqlite_ext/init_injection.rb
sqlite_ext-0.2.0 lib/sqlite_ext/init_injection.rb
sqlite_ext-0.1.1 lib/sqlite_ext/init_injection.rb
sqlite_ext-0.1.0 lib/sqlite_ext/init_injection.rb