Commit 9d118240 authored by Marius Rackwitz's avatar Marius Rackwitz

[Style] Use Pathname#open(…) instead of File.open(path, …)

parent 03c627ea
...@@ -24,7 +24,7 @@ module Pod ...@@ -24,7 +24,7 @@ module Pod
# #
def save_as(path) def save_as(path)
contents = generate contents = generate
File.open(path, 'w') do |f| path.open('w') do |f|
f.write(contents) f.write(contents)
end end
end end
......
...@@ -26,7 +26,7 @@ module Pod ...@@ -26,7 +26,7 @@ module Pod
def save_as(path) def save_as(path)
FileUtils.mkdir_p(path + '..') FileUtils.mkdir_p(path + '..')
contents = generate contents = generate
File.open(path, 'w') do |f| path.open('w') do |f|
f.write(contents) f.write(contents)
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment