Class: TxghQueue::Supervisor
- Inherits:
-
Object
- Object
- TxghQueue::Supervisor
- Defined in:
- lib/txgh-queue/supervisor.rb
Constant Summary collapse
- ERROR_HANDLERS =
ErrorHandlers::StandardErrors should always come last as a catch-all for unexpected errors. All errors handled by this supervisor inherit from StandardError, so putting it too early in the handler list may cause an error to be mis-handled.
[ ErrorHandlers::ServerResponse, ErrorHandlers::Github, ErrorHandlers::Gitlab, ErrorHandlers::Transifex, ErrorHandlers::TxghErrors, ErrorHandlers::StandardErrors, ErrorHandlers::NetworkErrors ]
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(&block) ⇒ Supervisor
constructor
A new instance of Supervisor.
Constructor Details
#initialize(&block) ⇒ Supervisor
Returns a new instance of Supervisor.
29 30 31 |
# File 'lib/txgh-queue/supervisor.rb', line 29 def initialize(&block) @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
27 28 29 |
# File 'lib/txgh-queue/supervisor.rb', line 27 def block @block end |
Class Method Details
.supervise(&block) ⇒ Object
22 23 24 |
# File 'lib/txgh-queue/supervisor.rb', line 22 def supervise(&block) new(&block).execute end |