class Deliveries::Pickup

Attributes

pickup_date[RW]

Public Class Methods

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

  self.pickup_date = attributes[:pickup_date]
end