Simplify Actions::Mkdir#apply
This commit is contained in:
parent
f7aa853a88
commit
2e6625d444
@ -7,7 +7,7 @@ module Producer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def apply
|
def apply
|
||||||
Pathname.new(path).descend do |p|
|
path.descend do |p|
|
||||||
next if fs.dir? p
|
next if fs.dir? p
|
||||||
fs.mkdir p.to_s
|
fs.mkdir p.to_s
|
||||||
fs.chmod p.to_s, mode if mode
|
fs.chmod p.to_s, mode if mode
|
||||||
@ -18,7 +18,7 @@ module Producer
|
|||||||
private
|
private
|
||||||
|
|
||||||
def path
|
def path
|
||||||
arguments.first
|
Pathname.new(arguments.first)
|
||||||
end
|
end
|
||||||
|
|
||||||
def mode
|
def mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user