Class: FarmingEngineers::Invoices::Eggs::Delivery

Inherits:
Common::HistoryItem show all
Defined in:
lib/farming_engineers/invoices/eggs.rb

Instance Attribute Summary

Attributes inherited from Common::HistoryItem

#date, #description, #quantity, #total

Instance Method Summary collapse

Constructor Details

#initialize(date, dozens, opts = {}) ⇒ Delivery

Returns a new instance of Delivery.



19
20
21
22
23
24
# File 'lib/farming_engineers/invoices/eggs.rb', line 19

def initialize(date, dozens, opts = {})
  @date = date
  @description = 'Delivery'
  @quantity = dozens
  @total = calculate opts.merge(:dozens => dozens)
end