Class: Locfile
- Inherits:
-
Object
- Object
- Locfile
- Defined in:
- lib/localio/locfile.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Locfile
constructor
A new instance of Locfile.
-
#platform(name, options = {}) ⇒ Object
Defines the platform.
-
#source(service, options = {}) ⇒ Object
Defines the service storing the translations.
Constructor Details
#initialize ⇒ Locfile
Returns a new instance of Locfile.
31 32 33 34 35 36 37 38 39 |
# File 'lib/localio/locfile.rb', line 31 def initialize @platform_name = nil @platform_options = nil @source_service = :google_drive @source_path = nil @source_options = nil @output_path = './out/' @formatting = :smart end |
Class Method Details
.load(filename) ⇒ Object
59 60 61 62 63 |
# File 'lib/localio/locfile.rb', line 59 def self.load(filename) dsl = new dsl.instance_eval(File.read(filename), filename) dsl end |
Instance Method Details
#platform(name, options = {}) ⇒ Object
Defines the platform
service : any of the supported ones (see above) options : hash with extra options, view documentation for the different services
45 46 47 48 |
# File 'lib/localio/locfile.rb', line 45 def platform(name, = {}) @platform_name = name @platform_options = end |
#source(service, options = {}) ⇒ Object
Defines the service storing the translations
service : can be :google_drive, :xls options : hash with extra options, view documentation for the different services
54 55 56 57 |
# File 'lib/localio/locfile.rb', line 54 def source(service, = {}) @source_service = service @source_options = end |