Class: Rack::Webtranslateit::TranslationFile

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/webtranslateit/translation_file.rb

Defined Under Namespace

Classes: ForLocale

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, file_path, api_key, master_locale) ⇒ TranslationFile

Returns a new instance of TranslationFile.



8
9
10
11
12
13
# File 'lib/rack/webtranslateit/translation_file.rb', line 8

def initialize(id, file_path, api_key, master_locale)
  self.id        = id
  self.file_path = file_path
  self.api_key   = api_key
  self.master_locale = master_locale
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



6
7
8
# File 'lib/rack/webtranslateit/translation_file.rb', line 6

def api_key
  @api_key
end

#file_pathObject

Returns the value of attribute file_path.



6
7
8
# File 'lib/rack/webtranslateit/translation_file.rb', line 6

def file_path
  @file_path
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/rack/webtranslateit/translation_file.rb', line 6

def id
  @id
end

#master_localeObject

Returns the value of attribute master_locale.



6
7
8
# File 'lib/rack/webtranslateit/translation_file.rb', line 6

def master_locale
  @master_locale
end

Instance Method Details

#for(locale) ⇒ Object



15
16
17
# File 'lib/rack/webtranslateit/translation_file.rb', line 15

def for(locale)
  ForLocale.new(self, locale)
end