lib/physical/item.rb in physical-0.4.3 vs lib/physical/item.rb in physical-0.4.4

- old
+ new

@@ -1,7 +1,18 @@ # frozen_string_literal: true module Physical class Item < Cuboid DEFAULT_LENGTH = 0 + + attr_reader :cost, + :sku, + :description + + def initialize(cost: nil, sku: nil, description: nil, **kwargs) + @cost = Types::Money.optional[cost] + @sku = sku + @description = description + super kwargs + end end end