Class: PolyglotCli::Command::Setup

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helper::General

#config, #languages, #project, #project_id, #remote_translations, #server_changed?, #token, #update_config

Methods included from Helper::Terminal

#prompt, #success

Class Method Details

.initObject



7
8
9
# File 'lib/polyglot_cli/commands/setup.rb', line 7

def self.init
  new.call
end

Instance Method Details

#callObject



11
12
13
14
15
16
17
# File 'lib/polyglot_cli/commands/setup.rb', line 11

def call
  PolyglotCli::IO::Config.write(
    project_id: project_id_prompt,
    locale_path: locale_path_prompt
  )
  success
end