Class: Translate::Storage

Inherits:
Object
  • Object
show all
Defined in:
lib/translate/storage.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Storage) initialize(locale)

Returns a new instance of Storage



5
6
7
# File 'lib/translate/storage.rb', line 5

def initialize(locale)
  self.locale = locale.to_sym
end

Instance Attribute Details

- (Object) locale

Returns the value of attribute locale



3
4
5
# File 'lib/translate/storage.rb', line 3

def locale
  @locale
end

Instance Method Details

- (Object) write_to_file



9
10
11
# File 'lib/translate/storage.rb', line 9

def write_to_file
  Translate::File.new(file_path).write(keys)
end