lib/google_translate_tts/fileable.rb in google-translate-tts-0.1.0 vs lib/google_translate_tts/fileable.rb in google-translate-tts-0.2.0
- old
+ new
@@ -1,5 +1,10 @@
+# frozen_string_literal: true
+
+require "tempfile"
+require "securerandom"
+
module GoogleTranslateTts
module Fileable
def self.included(base)
base.extend(ClassMethods)
end
@@ -12,10 +17,10 @@
block.call(file)
end
end
def setup_temp_dir!
- FileUtils.mkdir_p(self::TTS_TMP_DIR) unless Dir.exists? self::TTS_TMP_DIR
+ FileUtils.mkdir_p(self::TTS_TMP_DIR) unless Dir.exist? self::TTS_TMP_DIR
end
end
end
end