Simplify Action#check_arguments_size!
This commit is contained in:
parent
c8b685b8a3
commit
ed71f1c183
@ -32,10 +32,9 @@ module Producer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_arguments_size!(size)
|
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]
|
fail ArgumentError, '`%s\' action requires %d arguments' % [name, size]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user