Class: Accountability::Inventory::InventoryItem
- Inherits:
-
Object
- Object
- Accountability::Inventory::InventoryItem
- Defined in:
- app/models/accountability/inventory.rb
Instance Attribute Summary collapse
-
#product ⇒ Object
Returns the value of attribute product.
-
#record ⇒ Object
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record:, product:) ⇒ InventoryItem
constructor
A new instance of InventoryItem.
- #price ⇒ Object
Constructor Details
#initialize(record:, product:) ⇒ InventoryItem
Returns a new instance of InventoryItem.
45 46 47 48 |
# File 'app/models/accountability/inventory.rb', line 45 def initialize(record:, product:) @record = record @product = product end |
Instance Attribute Details
#product ⇒ Object
Returns the value of attribute product.
43 44 45 |
# File 'app/models/accountability/inventory.rb', line 43 def product @product end |
#record ⇒ Object
Returns the value of attribute record.
43 44 45 |
# File 'app/models/accountability/inventory.rb', line 43 def record @record end |
Instance Method Details
#price ⇒ Object
50 51 52 |
# File 'app/models/accountability/inventory.rb', line 50 def price product.price end |