Class: McTranslator::Translator
- Inherits:
-
Object
- Object
- McTranslator::Translator
- Defined in:
- lib/mc_translator.rb
Instance Method Summary collapse
-
#initialize ⇒ Translator
constructor
A new instance of Translator.
- #print_msg(msg) ⇒ Object
- #pull_all ⇒ Object
- #pull_job ⇒ Object
- #push_all ⇒ Object
- #push_changed ⇒ Object
Constructor Details
#initialize ⇒ Translator
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
#print_msg(msg) ⇒ Object
16 17 18 19 |
# File 'lib/mc_translator.rb', line 16 def print_msg(msg) puts puts msg end |
#pull_all ⇒ Object
44 45 46 |
# File 'lib/mc_translator.rb', line 44 def pull_all pull all_files end |
#pull_job ⇒ Object
40 41 42 |
# File 'lib/mc_translator.rb', line 40 def pull_job pull job_files end |
#push_all ⇒ Object
36 37 38 |
# File 'lib/mc_translator.rb', line 36 def push_all push all_files end |
#push_changed ⇒ Object
32 33 34 |
# File 'lib/mc_translator.rb', line 32 def push_changed push changed_files end |