Class: Transporter::Package
- Inherits:
-
Object
- Object
- Transporter::Package
- Includes:
- Ninja
- Defined in:
- lib/transporter/package.rb
Instance Attribute Summary collapse
-
#full ⇒ Object
readonly
Returns the value of attribute full.
-
#short ⇒ Object
readonly
Returns the value of attribute short.
Instance Method Summary collapse
- #deliver ⇒ Object
-
#initialize(package) ⇒ Package
constructor
A new instance of Package.
Constructor Details
#initialize(package) ⇒ Package
Returns a new instance of Package.
7 8 9 10 11 12 |
# File 'lib/transporter/package.rb', line 7 def initialize(package) = package.fetch(:message) @short = .fetch(:short) @full = .fetch(:full) @services = package.fetch(:using) end |
Instance Attribute Details
#full ⇒ Object (readonly)
Returns the value of attribute full.
5 6 7 |
# File 'lib/transporter/package.rb', line 5 def full @full end |
#short ⇒ Object (readonly)
Returns the value of attribute short.
5 6 7 |
# File 'lib/transporter/package.rb', line 5 def short @short end |
Instance Method Details
#deliver ⇒ Object
14 15 16 17 18 |
# File 'lib/transporter/package.rb', line 14 def deliver delivery_services.each do |service| in_background { service.deliver(self) } end end |