lib/i18n_screwdriver.rb in i18n_screwdriver-10.7.1 vs lib/i18n_screwdriver.rb in i18n_screwdriver-10.7.2
- old
+ new
@@ -22,15 +22,15 @@
source = source.strip
(source =~ /^:[a-z][a-z0-9_]*$/) ? source : Digest::MD5.hexdigest(source)
end
def self.file_with_translations_exists?(locale)
- File.exists?(filename_for_locale(locale))
+ File.exist?(filename_for_locale(locale))
end
def self.load_translations(locale)
path = filename_for_locale(locale)
- raise Error, "File #{path} not found!" unless File.exists?(path)
+ raise Error, "File #{path} not found!" unless File.exist?(path)
sanitize_hash(YAML.load_file(path)[locale])
end
def self.write_translations(locale, translations)
File.open(filename_for_locale(locale), "w") do |file|