Class: Comable::Inventory::Coordinator
- Inherits:
-
Object
- Object
- Comable::Inventory::Coordinator
- Defined in:
- app/models/comable/inventory/coordinator.rb
Instance Attribute Summary collapse
-
#order ⇒ Object
Returns the value of attribute order.
-
#units ⇒ Object
Returns the value of attribute units.
Instance Method Summary collapse
-
#initialize(order) ⇒ Coordinator
constructor
A new instance of Coordinator.
- #shipments ⇒ Object
Constructor Details
#initialize(order) ⇒ Coordinator
Returns a new instance of Coordinator.
7 8 9 10 |
# File 'app/models/comable/inventory/coordinator.rb', line 7 def initialize(order) @order = order @units = build_units end |
Instance Attribute Details
#order ⇒ Object
Returns the value of attribute order.
4 5 6 |
# File 'app/models/comable/inventory/coordinator.rb', line 4 def order @order end |
#units ⇒ Object
Returns the value of attribute units.
5 6 7 |
# File 'app/models/comable/inventory/coordinator.rb', line 5 def units @units end |
Instance Method Details
#shipments ⇒ Object
12 13 14 |
# File 'app/models/comable/inventory/coordinator.rb', line 12 def shipments packages.map(&:to_shipment) end |