Slide 202
Slide 202 text
@sandimetz Sept 2012
class
Shock
def
cost(type)
case
type
when
:front
FrontShockCost.new.compute
when
:rear
RearShockCost.new.compute
when
:lefty
LeftyShockCost.new.compute
else
ShockCost.new.compute
end
end
#
...
end
when
:front
FrontShockCost.new.compute
#3 Composition
98
Friday, September 14, 2012