Class: PolyglotCli::Command::Pull
Class Method Summary
collapse
Instance Method Summary
collapse
#config, #languages, #project, #project_id, #remote_translations, #select_languages, #server_changed?, #subdomain, #token, #update_config
#prompt, #success
#denest, #nest
Constructor Details
#initialize(options) ⇒ Pull
12
13
14
|
# File 'lib/polyglot_cli/commands/pull.rb', line 12
def initialize(options)
@options = options
end
|
Class Method Details
.init(options) ⇒ Object
8
9
10
|
# File 'lib/polyglot_cli/commands/pull.rb', line 8
def self.init(options)
new(options).call
end
|
Instance Method Details
#call ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/polyglot_cli/commands/pull.rb', line 16
def call
languages(option_locale).each do |language|
PolyglotCli::IO::Locale.write(locale_path, translation_hash(language))
end
update_config
success
end
|