Module: Transporter

Defined in:
lib/transporter.rb,
lib/transporter/package.rb,
lib/transporter/service.rb,
lib/transporter/service/validations.rb

Defined Under Namespace

Classes: Package, Service

Class Method Summary collapse

Class Method Details

.deliver(package) ⇒ Object



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

def self.deliver(package)
  Package.new(package).deliver
end

.load_service(service) ⇒ Object



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

def self.load_service(service)
  services.fetch(service)
end

.register(name, service) ⇒ Object



12
13
14
# File 'lib/transporter.rb', line 12

def self.register(name, service)
  services[name] = service
end

.servicesObject



20
21
22
# File 'lib/transporter.rb', line 20

def self.services
  @services ||= {}
end