124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
# File 'lib/mgmg/cuisine.rb', line 124
module_function def cuisine(*arg)
case arg.size
when 3
if arg.all?{ |e| e.kind_of?(Integer) } then
Cuisine.new( Vec[*arg] )
else
raise ArgumentError, "All the cuisine parameters must be Integer."
end
when 1
SystemCuisine[arg[0]] or raise ArgumentError, "The cuisine name `#{arg[0]}' is not supported."
when 4
Cuisine.cook(*arg)
else
raise ArgumentError, 'The number of argument must be 1, 3 or 4.'
end
end
|