Class: Hyperion::AsyncPg::Patches

Inherits:
Module
  • Object
show all
Defined in:
lib/hyperion/async_pg.rb

Overview

Module-builder. Receiving a list of methods, returns an anonymous Module that defines each one as an async-aware shim. Prepending it onto PG::Connection makes the shim run before the C method.

Instance Method Summary collapse

Constructor Details

#initialize(methods) ⇒ Patches

Returns a new instance of Patches.



124
125
126
127
128
# File 'lib/hyperion/async_pg.rb', line 124

def initialize(methods)
  super()
  @methods = methods
  define_methods
end