Class: SmartlingXcode::Project
- Inherits:
-
Object
- Object
- SmartlingXcode::Project
- Defined in:
- lib/smartling_xcode.rb
Instance Attribute Summary collapse
-
#projectPath ⇒ Object
Returns the value of attribute projectPath.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#projectPath ⇒ Object
Returns the value of attribute projectPath.
7 8 9 |
# File 'lib/smartling_xcode.rb', line 7 def projectPath @projectPath end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
7 8 9 |
# File 'lib/smartling_xcode.rb', line 7 def sandbox @sandbox end |
#version ⇒ Object
Returns the value of attribute version.
7 8 9 |
# File 'lib/smartling_xcode.rb', line 7 def version @version end |
Instance Method Details
#extract ⇒ Object
14 15 16 17 18 19 |
# File 'lib/smartling_xcode.rb', line 14 def extract project = Xcodeproj::Project.find(@projectPath) files = project.extract puts "\nOutput:" puts files end |
#getversion ⇒ Object
33 34 35 36 37 |
# File 'lib/smartling_xcode.rb', line 33 def getversion project = Xcodeproj::Project.find(@projectPath) @version = project.getVersion puts "Version #{@version} will be used." end |
#init ⇒ Object
9 10 11 12 |
# File 'lib/smartling_xcode.rb', line 9 def init api = API.new({:sandbox => @sandbox}) api.requestCredentials end |
#push ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/smartling_xcode.rb', line 21 def push api = API.new({:sandbox => @sandbox}) api.loadCredentials() project = Xcodeproj::Project.find(@projectPath) files = project.extract if @version.nil? @version = project.getVersion end api.pushStringsFromFiles(files, @version) puts "\nYour files are now available in the Files section of your Smartling project." end |