2008-01-29から1日間の記事一覧
module FactoryMethod class IDCard def initialize(str) @owner = str end def use "#{@owner}のカード" end end module Factory def create(*arg) product(*arg) end end class IDCardFactory include Factory def product(str) IDCard.new(str) end end e…