Class: Accountability::Inventory::InventoryItem

Inherits:
Object
  • Object
show all
Defined in:
app/models/accountability/inventory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#productObject

Returns the value of attribute product.



43
44
45
# File 'app/models/accountability/inventory.rb', line 43

def product
  @product
end

#recordObject

Returns the value of attribute record.



43
44
45
# File 'app/models/accountability/inventory.rb', line 43

def record
  @record
end

Instance Method Details

#priceObject



50
51
52
# File 'app/models/accountability/inventory.rb', line 50

def price
  product.price
end