Class: Ridgepole::ExecuteExpander
- Inherits:
-
Object
- Object
- Ridgepole::ExecuteExpander
show all
- Defined in:
- lib/ridgepole/execute_expander.rb
Defined Under Namespace
Modules: ConnectionAdapterExt
Classes: Stub
Class Method Summary
collapse
Class Method Details
.expand_execute(connection) ⇒ Object
87
88
89
90
91
92
93
|
# File 'lib/ridgepole/execute_expander.rb', line 87
def expand_execute(connection)
return if connection.is_a?(ConnectionAdapterExt)
connection.class_eval do
prepend ConnectionAdapterExt
end
end
|
80
81
82
83
84
85
|
# File 'lib/ridgepole/execute_expander.rb', line 80
def ()
self. =
yield
ensure
self. = nil
end
|
.with_script(script, logger) ⇒ Object
71
72
73
74
75
76
77
78
|
# File 'lib/ridgepole/execute_expander.rb', line 71
def with_script(script, logger)
self.use_script = true
self.sql_executer = Ridgepole::ExternalSqlExecuter.new(script, logger)
yield
ensure
self.use_script = false
self.sql_executer = nil
end
|
.without_operation(callback = nil) ⇒ Object
62
63
64
65
66
67
68
69
|
# File 'lib/ridgepole/execute_expander.rb', line 62
def without_operation(callback = nil)
self.noop = true
self.callback = callback
yield
ensure
self.noop = false
self.callback = nil
end
|