1
0

Add delegate methods to shipment class

This commit is contained in:
Tim Kächele 2021-03-07 18:09:27 +01:00
parent e0d300c441
commit 47a013eb66

View File

@ -10,6 +10,22 @@ module PlanetExpress
@discounts = [] @discounts = []
end end
def month
date.begin_of_month
end
def s_shipment?
shipping_option.s_shipment?
end
def l_shipment?
shipping_option.l_shipment?
end
def provider
shipping_option.provider
end
def if_valid(&block) def if_valid(&block)
yield self yield self
end end
@ -19,7 +35,7 @@ module PlanetExpress
end end
def inspect def inspect
"#{self.class.name} [#{date} #{shipping_option}]" "#{self.class.name} [#{date} #{shipping_option.inspect} #{discounts}]"
end end
end end
end end