Sha256: f7b34e987b02d6bf86c2f61ef79e02f46971e488ba72fe1f80d26796b28b1395
Contents?: true
Size: 437 Bytes
Versions: 2
Compression:
Stored size: 437 Bytes
Contents
module PgDecorator class Injector def self.inject(custom_app_name='Ruby pg app', custom_app_root=null) custom_app_root ||= Dir.pwd require 'pg' unless defined?( PG ) require_relative 'decorator' PG::Connection.module_eval do define_method(:app_name) { custom_app_name } define_method(:app_root) { custom_app_root} include PgDecorator::Decorator end true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pg_decorator-0.0.4 | lib/pg_decorator/injector.rb |
pg_decorator-0.0.3 | lib/pg_decorator/injector.rb |