Class: Squirm::Executor

Inherits:
Object
  • Object
show all
Includes:
Core
Defined in:
lib/squirm/executor.rb

Overview

This class exists simply to provide a space in which to evaluate blocked passed to the Kernel.Squirm method.

Instance Attribute Summary

Attributes included from Core

#pool

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Core

#connect, #disconnect, #exec, #procedure, #quote_ident, #rollback, #transaction, #use

Constructor Details

#initialize(pool) ⇒ Executor

Returns a new instance of Executor.



13
14
15
# File 'lib/squirm/executor.rb', line 13

def initialize(pool)
  @pool = pool
end

Class Method Details

.eval(&block) ⇒ Object



8
9
10
11
# File 'lib/squirm/executor.rb', line 8

def self.eval(&block)
  executor = new(Squirm.pool)
  executor.instance_eval(&block)
end