Class: BabelYoda::StringsHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/babelyoda/strings.rb

Class Method Summary collapse

Class Method Details

.safe_init_strings_file(path) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/babelyoda/strings.rb', line 3

def self.safe_init_strings_file(path)
  unless File.exists? path
    empty_strings_file = File.join File.dirname(__FILE__), '..', '..', 'data', 'empty.strings'
    FileUtils.mkdir_p File.split(path)[0], :verbose => true
    FileUtils.cp empty_strings_file, path, :verbose => true
  end
end