lib/tori/backend/filesystem.rb in tori-0.0.9 vs lib/tori/backend/filesystem.rb in tori-0.1.0
- old
+ new
@@ -5,10 +5,10 @@
def initialize(root)
@root = root
FileUtils.mkdir_p @root.to_s
end
- def write(filename, resource)
+ def write(filename, resource, opts = nil)
case resource
when String
::File.open(path(filename), 'w'){ |f| f.write resource }
when Pathname
# see also https://bugs.ruby-lang.org/issues/11199