Class: FarmingEngineers::Invoices::Common::LineItem
- Inherits:
-
HistoryItem
- Object
- HistoryItem
- FarmingEngineers::Invoices::Common::LineItem
- Defined in:
- lib/farming_engineers/invoices/common.rb
Instance Attribute Summary
Attributes inherited from HistoryItem
#date, #description, #quantity, #total
Instance Method Summary collapse
-
#initialize(*args) ⇒ LineItem
constructor
A new instance of LineItem.
Constructor Details
#initialize(*args) ⇒ LineItem
Returns a new instance of LineItem.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/farming_engineers/invoices/common.rb', line 19 def initialize(*args) case args.first when Hash args = args.first @date = args[:date] @description = args[:description] @quantity = args[:quantity] @total = args[:total] else @date, @description, @quantity, @total = args end end |