Class: Jets::Turbine

Inherits:
Object
  • Object
show all
Defined in:
lib/jets/turbine.rb

Direct Known Subclasses

Mailer

Class Method Summary collapse

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

.configObject

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

.subclassesObject



8
9
10
# File 'lib/jets/turbine.rb', line 8

def subclasses
  @subclasses ||= []
end