Class: PolyglotFlutter::Command::Pull

Inherits:
Object
  • Object
show all
Includes:
Helper::General, Helper::Terminal
Defined in:
lib/flutter_polyglot_cli/commands/pull.rb

Constant Summary

Constants included from Helper::General

Helper::General::ESCAPE_KEYWORDS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helper::General

#clean_enum_name, #clean_variable_name, #config, #escape_keyword_if_needed, #escape_with_underscore_if_needed, #extract_translations, #find_app_language, #generate_locales, #generate_localization_keys, #generate_static_locales, #generate_strings, #indent, #project_configs, #token

Methods included from Helper::Terminal

#prompt, #success

Class Method Details

.initObject



7
8
9
# File 'lib/flutter_polyglot_cli/commands/pull.rb', line 7

def self.init
  new.call
end

Instance Method Details

#callObject



11
12
13
14
15
# File 'lib/flutter_polyglot_cli/commands/pull.rb', line 11

def call
  prompt.say('Fetching translations...')
  generate_translations(project_configs)
  success('Translations successfully generated!')
end