Fail when `file_append' misses some arguments

This commit is contained in:
Thibault Jouan
2014-10-09 19:47:52 +00:00
parent 770f4df51e
commit 5549ebc676
2 changed files with 14 additions and 0 deletions

View File

@@ -3,6 +3,10 @@ module Producer
module Actions
class FileAppend < Action
def setup
if arguments.compact.size != 2
fail ArgumentError, '`%s\' action requires 2 arguments' % name
end
@path, @content = arguments
end