Accept mode as argument in `mkdir' action

This commit is contained in:
Thibault Jouan
2014-04-25 00:28:20 +00:00
parent 5cb6296057
commit 94f6bbb4aa
6 changed files with 68 additions and 7 deletions

View File

@@ -3,12 +3,21 @@ module Producer
module Actions
class Mkdir < Action
def apply
fs.mkdir path
case arguments.size
when 1
fs.mkdir path
when 2
fs.mkdir path, mode
end
end
def path
arguments.first
end
def mode
arguments[1]
end
end
end
end