lib/clamsy/file_system_support.rb in clamsy-0.0.4 vs lib/clamsy/file_system_support.rb in clamsy-0.0.5

- old
+ new

@@ -19,12 +19,12 @@ def trash_tmp_files (@trashable_tmp_files || []).each {|f| f.path && f.unlink } @trashable_tmp_files = nil end - def tmp_file(file_name = nil) - file_name ||= Digest::MD5.hexdigest(Time.now.to_s) - ((@trashable_tmp_files ||= []) << Tempfile.new(file_name))[-1] + def tmp_file(basename = nil) + basename ||= Digest::MD5.hexdigest(Time.now.to_s) + ((@trashable_tmp_files ||= []) << Tempfile.new(basename))[-1] end protected def raise_file_not_found_error(path)