Class: Jets::Turbine
- Inherits:
-
Object
- Object
- Jets::Turbine
- Defined in:
- lib/jets/turbine.rb
Direct Known Subclasses
Class Method Summary collapse
- .after_initializer(label, &block) ⇒ Object
-
.config ⇒ Object
Make config available in Turbine.
- .exception_reporter(label, &block) ⇒ Object
- .inherited(base) ⇒ Object
- .initializer(label, &block) ⇒ Object
- .on_exception(label, &block) ⇒ Object
- .subclasses ⇒ Object
Class Method Details
.after_initializer(label, &block) ⇒ Object
16 17 18 19 |
# File 'lib/jets/turbine.rb', line 16 def after_initializer(label, &block) self.after_initializers ||= {} self.after_initializers[label] = block end |
.config ⇒ Object
Make config available in Turbine. Note only available outside of hooks like initializers.
36 37 38 |
# File 'lib/jets/turbine.rb', line 36 def config Jets.application.config end |
.exception_reporter(label, &block) ⇒ Object
31 32 33 |
# File 'lib/jets/turbine.rb', line 31 def exception_reporter(label, &block) on_exception(label, &block) end |
.inherited(base) ⇒ Object
12 13 14 |
# File 'lib/jets/turbine.rb', line 12 def inherited(base) subclasses << base end |
.initializer(label, &block) ⇒ Object
21 22 23 24 |
# File 'lib/jets/turbine.rb', line 21 def initializer(label, &block) self.initializers ||= {} self.initializers[label] = block end |
.on_exception(label, &block) ⇒ Object
26 27 28 29 |
# File 'lib/jets/turbine.rb', line 26 def on_exception(label, &block) self.on_exceptions ||= {} self.on_exceptions[label] = block end |
.subclasses ⇒ Object
8 9 10 |
# File 'lib/jets/turbine.rb', line 8 def subclasses @subclasses ||= [] end |