Class: McTranslator::Translator

Inherits:
Object
  • Object
show all
Defined in:
lib/mc_translator.rb

Instance Method Summary collapse

Constructor Details

#initializeTranslator

Returns a new instance of Translator.



21
22
23
24
25
26
27
28
29
30
# File 'lib/mc_translator.rb', line 21

def initialize
  args = {
    userId: ENV['SMARTLING_USER_ID'],
    userSecret: ENV['SMARTLING_USER_SECRET'],
    projectId: ENV['SMARTLING_PROJECT_ID'],
  }

  @files = Smartling::File.new(args)
  @jobs = Smartling::Job.new(args)
end

Instance Method Details



16
17
18
19
# File 'lib/mc_translator.rb', line 16

def print_msg(msg)
  puts
  puts msg
end

#pull_allObject



44
45
46
# File 'lib/mc_translator.rb', line 44

def pull_all
  pull all_files
end

#pull_jobObject



40
41
42
# File 'lib/mc_translator.rb', line 40

def pull_job
  pull job_files
end

#push_allObject



36
37
38
# File 'lib/mc_translator.rb', line 36

def push_all
  push all_files
end

#push_changedObject



32
33
34
# File 'lib/mc_translator.rb', line 32

def push_changed
  push changed_files
end