Class: Deliveries::Pickup
Constant Summary
Constants inherited from Delivery
Instance Attribute Summary collapse
-
#pickup_date ⇒ Object
Returns the value of attribute pickup_date.
Instance Method Summary collapse
-
#initialize(delivery: nil, **attributes) ⇒ Pickup
constructor
A new instance of Pickup.
Methods inherited from Delivery
Constructor Details
#initialize(delivery: nil, **attributes) ⇒ Pickup
Returns a new instance of Pickup.
5 6 7 8 9 10 11 12 13 |
# 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 |
Instance Attribute Details
#pickup_date ⇒ Object
Returns the value of attribute pickup_date.
3 4 5 |
# File 'lib/deliveries/pickup.rb', line 3 def pickup_date @pickup_date end |