Class: Translatomatic::ResourceFile::RESW
- Defined in:
- lib/translatomatic/resource_file/resw.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.extensions ⇒ Array<String>
File extensions supported by this resource file.
Instance Method Summary collapse
-
#locale_path(locale) ⇒ Pathname
Create a path for the current resource file with a given locale.
Methods inherited from XML
Methods inherited from Base
#format, #get, #initialize, #save, #sentences, #set, #to_s, #valid?
Methods included from Util
Constructor Details
This class inherits a constructor from Translatomatic::ResourceFile::XML
Class Method Details
.extensions ⇒ Array<String>
Returns File extensions supported by this resource file.
5 6 7 |
# File 'lib/translatomatic/resource_file/resw.rb', line 5 def self.extensions %w{resw} end |
Instance Method Details
#locale_path(locale) ⇒ Pathname
Create a path for the current resource file with a given locale
10 11 12 13 14 |
# File 'lib/translatomatic/resource_file/resw.rb', line 10 def locale_path(locale) # e.g. strings/en-US/resources.resw dir = path.dirname dir.parent + locale.to_s + path.basename end |