def xxx(*args) case args.size when 1 @a = args[0] when 2 @a = args[0] @b = args[1] when 3 @a = args[0] @b = args[1] @c = args[2] end end