Class: PolyglotCli::Command::Push
- Inherits:
-
Object
- Object
- PolyglotCli::Command::Push
- Includes:
- Helper::General, Helper::Nest, Helper::Terminal
- Defined in:
- lib/polyglot_cli/commands/push.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ Push
constructor
A new instance of Push.
Methods included from Helper::General
#config, #languages, #project, #project_id, #remote_translations, #server_changed?, #token, #update_config
Methods included from Helper::Terminal
Methods included from Helper::Nest
Constructor Details
#initialize(options) ⇒ Push
Returns a new instance of Push.
12 13 14 |
# File 'lib/polyglot_cli/commands/push.rb', line 12 def initialize() @options = end |
Class Method Details
.init(options) ⇒ Object
8 9 10 |
# File 'lib/polyglot_cli/commands/push.rb', line 8 def self.init() new().call end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/polyglot_cli/commands/push.rb', line 16 def call if server_changed? prompt.error('Changes have been made on the server. Please pull before pushing.') else languages(option_locale).each do |language| prompt.say("Processing push for #{language.name}...") process(language) end update_config success end end |