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.



10
11
12
13
14
15
# File 'lib/farming_engineers/invoices/eggs.rb', line 10

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