Simplify Action#check_arguments_size!

This commit is contained in:
Thibault Jouan 2015-05-12 15:03:25 +00:00
parent c8b685b8a3
commit ed71f1c183

View File

@ -32,10 +32,9 @@ module Producer
end
def check_arguments_size!(size)
if arguments.compact.size != size
return if arguments.compact.size == size
fail ArgumentError, '`%s\' action requires %d arguments' % [name, size]
end
end
end
end
end