Module: Courier

Defined in:
lib/courier.rb,
lib/courier/engine.rb

Defined Under Namespace

Modules: Owner, Service, Template Classes: Config, Engine, Message, OwnerSetting

Class Method Summary collapse

Class Method Details

.deliver_all!Object



20
21
22
23
24
# File 'lib/courier.rb', line 20

def deliver_all!
  config.services.each do |service|
    service.deliver_all!
  end
end

.init {|self.config = Courier::Config.new| ... } ⇒ Object

Yields:



16
17
18
# File 'lib/courier.rb', line 16

def init
  yield self.config = Courier::Config.new
end

.service(name) ⇒ Object



31
32
33
34
# File 'lib/courier.rb', line 31

def service(name)
  return name if name.is_a?(Courier::Service::Base)
  config.get_service(name)
end

.template(key) ⇒ Object



26
27
28
29
# File 'lib/courier.rb', line 26

def template(key)
  return key if key.is_a?(Courier::Template::Base)
  config.get_template(key)
end