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

- old
+ new

@@ -6,13 +6,13 @@ 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 + def initialize(**kwargs) + @cost = Types::Money.optional[kwargs.delete(:cost)] + @sku = kwargs.delete(:sku) + @description = kwargs.delete(:description) + super(**kwargs) end end end