Class: Rack::Webtranslateit::TranslationFile
- Inherits:
-
Object
- Object
- Rack::Webtranslateit::TranslationFile
- Defined in:
- lib/rack/webtranslateit/translation_file.rb
Defined Under Namespace
Classes: ForLocale
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#id ⇒ Object
Returns the value of attribute id.
-
#master_locale ⇒ Object
Returns the value of attribute master_locale.
Instance Method Summary collapse
- #for(locale) ⇒ Object
-
#initialize(id, file_path, api_key, master_locale) ⇒ TranslationFile
constructor
A new instance of TranslationFile.
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_key ⇒ Object
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_path ⇒ Object
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 |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/rack/webtranslateit/translation_file.rb', line 6 def id @id end |
#master_locale ⇒ Object
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 |