Method: Vocab::Translator::Rails#write_file
- Defined in:
- lib/vocab/translator/rails.rb
#write_file(file) ⇒ Object
32 33 34 35 |
# File 'lib/vocab/translator/rails.rb', line 32 def write_file( file ) yaml = { @locale => self.translations }.to_yaml File.open( file, 'w+' ) { |f| f.write( yaml ) } end |