Class: Sequel::ConnectionGuard::Executor Private
- Inherits:
-
Object
- Object
- Sequel::ConnectionGuard::Executor
- Defined in:
- lib/sequel/extensions/connection_guard/executor.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Provides a DSL for accessing the database safely.
Instance Attribute Summary collapse
- #on_dead ⇒ Object readonly private
Instance Method Summary collapse
- #alive(&block) ⇒ Object private
- #dead(&block) ⇒ Object private
- #on_alive ⇒ Object private
Instance Attribute Details
#on_dead ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/sequel/extensions/connection_guard/executor.rb', line 32 def on_dead @on_dead end |
Instance Method Details
#alive(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'lib/sequel/extensions/connection_guard/executor.rb', line 38 def alive(&block) @on_alive = block end |
#dead(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 |
# File 'lib/sequel/extensions/connection_guard/executor.rb', line 46 def dead(&block) @on_dead = block end |
#on_alive ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 57 |
# File 'lib/sequel/extensions/connection_guard/executor.rb', line 54 def on_alive raise ConfigurationError, "`alive` handler is required for .safe_execute" if @on_alive.nil? @on_alive end |