Accept mode as argument in `mkdir' action
This commit is contained in:
1 parent
5cb6296057
commit
94f6bbb4aa
6 files changed
+68
-7
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user