Module: SqliteExt::InitInjection
- Included in:
- SQLite3::Database
- Defined in:
- lib/sqlite_ext/init_injection.rb
Overview
This module is prepended to ‘SQLite3::Database` to inject new initialization behavior.
Instance Method Summary collapse
-
#initialize(file, *other_init_args) ⇒ Object
Adds functions registered with SqliteExt to each new instance before it is returned from ‘.new` or `.open`or is passed to the given block.
Instance Method Details
#initialize(file, *other_init_args) ⇒ Object
Adds functions registered with SqliteExt to each new instance before it is returned from ‘.new` or `.open`or is passed to the given block.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sqlite_ext/init_injection.rb', line 10 def initialize(file, *other_init_args) if block_given? super file, *other_init_args do SqliteExt.enhance_db_session self yield self end else super SqliteExt.enhance_db_session self end end |