class Deliveries::Shipment

Attributes

shipment_date[RW]

Public Class Methods

new(delivery: nil, **attributes) click to toggle source
Calls superclass method Deliveries::Delivery::new
# File lib/deliveries/shipment.rb, line 5
def initialize(delivery: nil, **attributes)
  if delivery.is_a? Deliveries::Delivery
    super(**delivery.attributes)
  else
    super(**attributes)
  end

  self.shipment_date = attributes[:shipment_date]
end