
9.8
ステップ
2
:良い名前を選ぶ
161
r << "Construction Co. Ltd.\n"
when 'wind'
r << "Meter Report\n"
r << "Type: Wind\n"
r << "Construction Co. Ltd.\n"
when 'solar'
r << "Meter Report\n"
r << "Type: Solar\n"
r << "Construction Co. Ltd.\n"
end
return r.string
end
end
9
.
8
ステップ
2
:良い名前を選ぶ
MeterPrinter
m
r
def print(m) # m = meter
r << "Type: Gas\n" # r = report
1
...